From 4574180c45b7473fd6df772c9e13d6fbb5e73ecd Mon Sep 17 00:00:00 2001 From: Mikael Andersson Date: Fri, 28 Apr 2023 21:16:53 +0200 Subject: [PATCH] ci: change tag action --- .github/workflows/tag_and_release.yml | 32 +++++++++++++++++++-------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/.github/workflows/tag_and_release.yml b/.github/workflows/tag_and_release.yml index c73d2d6..1f8fea7 100644 --- a/.github/workflows/tag_and_release.yml +++ b/.github/workflows/tag_and_release.yml @@ -5,16 +5,30 @@ on: branches: main jobs: - tag_and_release: + + # Set a version tag on the repo, also used for naming the machine image to use. + tag: runs-on: ubuntu-latest - steps: - - id: tag - uses: hennejg/github-tag-action@v4.3.1 - with: + outputs: + new_version: ${{ steps.bump_tag.outputs.new_version }} + new_tag: ${{ steps.bump_tag.outputs.new_tag }} + changelog: ${{ steps.bump_tag.changelog }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: '0' + + - run: echo Triggered by ${{ github.event_name }} event + + - id: bump_tag + uses: mathieudutour/github-tag-action@v6.1 + with: github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Create Release + release_branches: main + + - name: Create a GitHub release uses: ncipollo/release-action@v1 with: - token: ${{ secrets.YOUR_GITHUB_TOKEN }} - body: ${{ steps.tag.outputs.changelog }} + tag: ${{ steps.bump_tag.outputs.new_tag }} + name: Release ${{ steps.bump_tag.outputs.new_tag }} + body: ${{ steps.bump_tag.outputs.changelog }}