From 04f11fa71ab78517378c3f21f392354e68778f66 Mon Sep 17 00:00:00 2001 From: Joshua Davey Date: Fri, 19 Apr 2024 22:56:44 -0400 Subject: [PATCH] Test release on canary branch --- .github/workflows/release.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5da1be..8a0b719 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,15 +17,9 @@ name: release on: - workflow_dispatch: - inputs: - tag: - description: 'Tag to release' - required: true push: - # Enable when testing release infrastructure on a branch. - # branches: - # - ag/work + branches: + - canary tags: - "v[0-9]+.[0-9]+.[0-9]+" @@ -46,12 +40,20 @@ jobs: echo "version is: $VERSION" - name: Check that tag version and Cargo.toml version are the same shell: bash + if: env.VERSION != 'canary' run: | if ! grep -q "version = \"$VERSION\"" Cargo.toml; then echo "version does not match Cargo.toml" >&2 exit 1 fi + - name: Create GitHub canary release + if: env.VERSION == 'canary' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release create $VERSION --draft --prerelease --title $VERSION + - name: Create GitHub release + if: env.VERSION != 'canary' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: gh release create $VERSION --draft --verify-tag --title $VERSION @@ -66,6 +68,7 @@ jobs: # Emit backtraces on panics. RUST_BACKTRACE: 1 strategy: + fail-fast: false matrix: build: [linux, linux-musl, macos, win-msvc] include: @@ -122,6 +125,7 @@ jobs: - name: Creating directory for archive shell: bash run: | + mkdir -p "$ARCHIVE" cp {README.md,CODE_OF_CONDUCT.md,LICENSE-APACHE,LICENSE-MIT} "$ARCHIVE/" cp "$BIN" "$ARCHIVE"/