Skip to content

wip

wip #8

Workflow file for this run

---
name: Release
on: # yamllint disable-line rule:truthy
push: null
pull_request: null
permissions:
contents: write
jobs:
release:
name: Release from push
runs-on: ubuntu-latest
steps:
- name: Pause until all workflows are completed
uses: willgarcia/workflow-wait-action@main
with:
interval: 2
initial_delay: 40
- name: Checkout
uses: actions/checkout@v4
- name: Parse Changelog
id: changelog
uses: ocavue/[email protected]
- name: Delete an old v${{ steps.changelog.outputs.latestVersion }} release
uses: ClementTsang/[email protected]
with:
delete_release: true
tag_name: v${{ steps.changelog.outputs.latestVersion }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Remove an old v${{ steps.changelog.outputs.latestVersion }} tag and push a new one
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git push --delete origin "v${{ steps.changelog.outputs.latestVersion }}" || true
git tag -a "v${{ steps.changelog.outputs.latestVersion }}" -m "${TAG_MESSAGE}"
git push origin "${{ steps.changelog.outputs.latestVersion }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG_MESSAGE: >-
${{ steps.changelog.outputs.latestVersion }}: PR #${{ github.event.pull_request.number }}
${{ github.event.pull_request.title }}
- name: Create a release
id: release
uses: ncipollo/release-action@v1
with:
name: v${{ steps.changelog.outputs.latestVersion }}
body: ${{ steps.changelog.outputs.latestBody }}
tag: v${{ steps.changelog.outputs.latestVersion }}
generateReleaseNotes: true
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: ${{ env.BINARY_NAME }}