Skip to content

Commit

Permalink
ci: change tag action
Browse files Browse the repository at this point in the history
  • Loading branch information
mikael-andersson91 authored Apr 28, 2023
1 parent e8e3684 commit 4574180
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/tag_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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/[email protected]
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 }}

0 comments on commit 4574180

Please sign in to comment.