Skip to content

Commit

Permalink
feat: adding branch-specific releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
l-monninger committed Nov 28, 2023
1 parent 141126c commit 067ca0d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Cargo Check
on:
push:
branches:
- dev
- stage
- main

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
with:
submodules: 'recursive'
token: ${{ secrets.CI_PAT }}
ref: ${{ github.event.inputs.branch }}

- name: Set up Rust
uses: actions-rs/toolchain@v1
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ jobs:
with:
submodules: 'recursive'
token: ${{ secrets.CI_PAT }}
ref: ${{ github.event.inputs.branch }}

- name: Set up Branch Name
id: branch_name
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV

- name: Bump version and push tag
id: create_tag
uses: anothrNick/[email protected] # Don't use @master or @v1 unless you're happy to test the latest version
Expand All @@ -47,11 +53,11 @@ jobs:
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.create_tag.outputs.tag }}
release_name: Release ${{ steps.create_tag.outputs.tag }}
body: Release ${{ steps.create_tag.outputs.tag }}
release_name: ${{ env.BRANCH_NAME == 'main' && 'Release ' || 'Release ' + env.BRANCH_NAME + '-' }}${{ steps.create_tag.outputs.tag }}
body: ${{ env.BRANCH_NAME == 'main' && 'Release ' || 'Release ' + env.BRANCH_NAME + '-' }}${{ steps.create_tag.outputs.tag }}
draft: false
prerelease: true

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
with:
submodules: 'recursive'
token: ${{ secrets.CI_PAT }}
ref: ${{ github.event.inputs.branch }}

- name: Setup
uses: ./.github/actions/setup-linux-x86_64
Expand Down

0 comments on commit 067ca0d

Please sign in to comment.