Skip to content

Commit

Permalink
Merge #770
Browse files Browse the repository at this point in the history
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
bors[bot] and taiki-e authored Jan 8, 2022
2 parents 7b6b46e + 7150435 commit d7835f4
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: CI

permissions:
contents: read

on:
pull_request:
push:
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
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')

0 comments on commit d7835f4

Please sign in to comment.