worflow/test debug shell commands #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release desertislandutils | |
on: | |
workflow_run: | |
workflows: [Merge Release Branch and Tag] | |
types: [completed] | |
branches: | |
- 'main' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- run: python --version | |
- run: | | |
pipx install --python $(which python) poetry | |
poetry install | |
poetry show --latest | |
- name: Get latest tag | |
- run: | | |
git branch --list | |
git log --oneline --tags -n10 --pretty=format:'%h %as %cn %x09%s %d' | |
echo | |
echo "current ref is ${{ github.ref_name }}" | |
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) | |
echo "latest tag: $LATEST_TAG" | |
- name: Build poetry distribution | |
run: | | |
git checkout $LATEST_TAG | |
poetry build | |
- name: Create release from tag | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "dist/*" | |
generateReleaseNotes: true | |
tag: $LATEST_TAG |