Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- "v*"
workflow_dispatch:

permissions:
contents: write
Expand All @@ -23,11 +24,13 @@ jobs:
- name: Build
run: cargo build --release
- name: Publish package
if: github.event_name != 'workflow_dispatch'
run: cargo workspaces publish --from-git
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Create a draft release
id: create_release
if: github.event_name != 'workflow_dispatch'
run: |
NEW_VERSION=$(cargo workspaces ls --json | jq -r '.[] | select(.name == "codspeed") | .version')
gh release create v$NEW_VERSION --title "v$NEW_VERSION" --generate-notes -d
Expand All @@ -44,8 +47,8 @@ jobs:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
- target: aarch64-unknown-linux-gnu
- target: x86_64-unknown-linux-musl
- target: aarch64-unknown-linux-musl
cross: true

runs-on: ubuntu-latest
Expand All @@ -58,6 +61,7 @@ jobs:
- run: ${{ matrix.cross && 'cross' || 'cargo' }} build --locked --release --bin cargo-codspeed --target ${{ matrix.target }}

- name: Upload Release Asset
if: github.event_name != 'workflow_dispatch'
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
Expand Down
Loading