Skip to content

Commit

Permalink
Create GitHub release automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jan 8, 2022
1 parent 7b6b46e commit 7150435
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 7150435

Please sign in to comment.