-
-
Notifications
You must be signed in to change notification settings - Fork 39
72 lines (68 loc) · 2.03 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Release
on:
push:
tags:
- v[0-9]+.*
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
RUST_BACKTRACE: 1
defaults:
run:
shell: bash
jobs:
upload-assets:
name: ${{ matrix.target }}
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
tap: true
- target: x86_64-apple-darwin
os: macos-latest
tap: true
- target: x86_64-pc-windows-msvc
os: windows-latest
tap: false
- target: x86_64-unknown-linux-musl
tap: false
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: zine
target: ${{ matrix.target }}
tar: all
zip: windows
features: openssl-vendored
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
CARGO_PROFILE_RELEASE_LTO: true
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Update zine homebrew formula
if: ${{ matrix.tap == true }}
run: |
curl -X POST -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.TOKEN }}" \
-d '{"event_type":"version-updated","client_payload":{"version":"${{ steps.get_version.outputs.VERSION }}"}}' \
https://api.github.com/repos/zineland/homebrew-tap/dispatches
cargo-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
- run: cargo package
- uses: taiki-e/create-gh-release-action@v1
with:
# changelog: CHANGELOG.md
title: $version
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
- run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}