-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
770: Create GitHub release automatically r=taiki-e a=taiki-e Refs: [create-gh-release-action](https://github.com/taiki-e/create-gh-release-action) Co-authored-by: Taiki Endo <[email protected]>
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
name: CI | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- crossbeam-[0-9]+.* | ||
- crossbeam-[a-z]+-[0-9]+.* | ||
|
||
env: | ||
RUSTFLAGS: -Dwarnings | ||
RUST_BACKTRACE: 1 | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
create-release: | ||
if: github.repository_owner == 'crossbeam-rs' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: taiki-e/create-gh-release-action@v1 | ||
with: | ||
prefix: crossbeam(-[a-z]+)? | ||
changelog: $prefix/CHANGELOG.md | ||
title: $prefix $version | ||
branch: master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: "!startsWith(github.ref_name, 'crossbeam-0')" | ||
# Since the crossbeam crate is located at the root, we need to handle it differently. | ||
# TODO: Consider moving crossbeam crate to a subdirectory. | ||
- uses: taiki-e/create-gh-release-action@v1 | ||
with: | ||
changelog: CHANGELOG.md | ||
title: crossbeam $version | ||
branch: master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
if: startsWith(github.ref_name, 'crossbeam-0') |