Skip to content

Commit

Permalink
Test release on canary branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jgdavey committed Apr 20, 2024
1 parent ef54ba4 commit 04f11fa
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]+"

Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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"/
Expand Down

0 comments on commit 04f11fa

Please sign in to comment.