Skip to content

Commit 795aa74

Browse files
ci: allow dry run of release build
1 parent 5273251 commit 795aa74

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/release.yml

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- "v*"
7+
workflow_dispatch:
78

89
permissions:
910
contents: write
@@ -23,11 +24,13 @@ jobs:
2324
- name: Build
2425
run: cargo build --release
2526
- name: Publish package
27+
if: github.event_name != 'workflow_dispatch'
2628
run: cargo workspaces publish --from-git
2729
env:
2830
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
2931
- name: Create a draft release
3032
id: create_release
33+
if: github.event_name != 'workflow_dispatch'
3134
run: |
3235
NEW_VERSION=$(cargo workspaces ls --json | jq -r '.[] | select(.name == "codspeed") | .version')
3336
gh release create v$NEW_VERSION --title "v$NEW_VERSION" --generate-notes -d
@@ -58,6 +61,7 @@ jobs:
5861
- run: ${{ matrix.cross && 'cross' || 'cargo' }} build --locked --release --bin cargo-codspeed --target ${{ matrix.target }}
5962

6063
- name: Upload Release Asset
64+
if: github.event_name != 'workflow_dispatch'
6165
id: upload-release-asset
6266
uses: actions/upload-release-asset@v1
6367
env:

0 commit comments

Comments
 (0)