diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2a6015f..6c2c4460 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,7 @@ on: push: tags: - "v*" + workflow_dispatch: permissions: contents: write @@ -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 @@ -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 @@ -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: