-
-
Notifications
You must be signed in to change notification settings - Fork 148
42 lines (39 loc) · 1.23 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Release
on:
push:
tags:
- console-subscriber-v[0-9]+.*
- console-api-v[0-9]+.*
- tokio-console-v[0-9]+.*
jobs:
create-release:
# only publish from the origin repository
if: github.repository_owner == 'tokio-rs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: extract tag
id: tag
run:
echo ::set-output name=TAG::$(echo $GITHUB_REF | sed -r 's/.*(console-subscriber|console-api|tokio-console).*/\1/')
- uses: taiki-e/create-gh-release-action@v1
with:
changelog: ${{ steps.tag.outputs.TAG }}/CHANGELOG.md
branch: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
upload-bins:
# only upload binaries if we're on the origin repository and if the tag is a
# `tokio-console` release
if: ${{ github.repository_owner == 'tokio-rs' && contains(github.ref, 'tokio-console') }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: tokio-console
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}