Skip to content

Commit

Permalink
add release in CI with if
Browse files Browse the repository at this point in the history
  • Loading branch information
Rovel committed Feb 20, 2024
1 parent fde055d commit 18f7cf3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 30 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,27 @@ jobs:
with:
name: ${{ matrix.target }}
path: target/${{ matrix.target }}/release/

release:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, 'Merge') }}
name: Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
artifacts: |
target/*
body: ${{ steps.tag_version.outputs.changelog }}
30 changes: 0 additions & 30 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit 18f7cf3

Please sign in to comment.