diff --git a/.github/workflows/release-update.yml b/.github/workflows/release-update.yml new file mode 100644 index 0000000..ebd4336 --- /dev/null +++ b/.github/workflows/release-update.yml @@ -0,0 +1,45 @@ +name: Update Release + +on: + push: + branches: + - "**" + + +jobs: # This job updates the release version + UpdateRelease: + name: Update Release + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Get next version + id: get_next_version + uses: hugcabbage/next-version@main + with: + prefix: 'v' + mode: 3 + - name: Show the next version + run: | + echo ${{ steps.get_next_version.outputs.version }} + - name: Create Release for master + if: github.ref == 'refs/heads/master' + uses: maxkomarychev/oction-create-release@v0.7.1 + with: + token: ${{secrets.GITHUB_TOKEN}} + tag_name: ${{ steps.get_next_version.outputs.version }} + target_commitish: ${{github.ref}} + name: "${{github.ref}} ${{ steps.get_next_version.outputs.version }}" + body: "This Release was created through github actions" + prerelease: false + - name: Create Release for ${{github.ref}} + if: github.ref != 'refs/heads/master' + uses: maxkomarychev/oction-create-release@v0.7.1 + with: + token: ${{secrets.GITHUB_TOKEN}} + tag_name: ${{ steps.get_next_version.outputs.version }} + target_commitish: ${{github.ref}} + name: "${{github.ref}} ${{ steps.get_next_version.outputs.version }}" + body: "This Release was created through github actions" + prerelease: true \ No newline at end of file