-
Notifications
You must be signed in to change notification settings - Fork 8
86 lines (79 loc) · 2.32 KB
/
release.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: release
permissions:
contents: "write"
on:
push:
tags: ["v[0-9]+.*"]
concurrency:
group: release-${{ github.ref_name }}
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
DRY_RUN: ${{ startsWith(github.event.ref, 'refs/tags/v') && '0' || '1' }}
jobs:
create-release:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
# (optional) Path to changelog.
#changelog: CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}
upload-assets:
needs: "create-release"
strategy:
matrix:
include:
- target: universal-apple-darwin
os: macos-14
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: usage
token: ${{ secrets.GITHUB_TOKEN }}
target: ${{ matrix.target }}
manifest-path: cli/Cargo.toml
env:
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1
CARGO_PROFILE_RELEASE_LTO: true
# push-to-registry:
# name: "Push Docker image to Docker Hub"
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
# needs:
# - "get-tag"
# - "upload-assets"
# runs-on: "ubuntu-latest"
# steps:
# - name: "Check out the repo"
# uses: actions/checkout@v3
#
# - name: "Log in to Docker Hub"
# uses: "docker/login-action@v2"
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
#
# - name: "Extract metadata (tags, labels) for Docker"
# id: "meta"
# uses: "docker/metadata-action@v4"
# with:
# images: "bwks/shazam"
#
# - name: "Build and push Docker image"
# uses: "docker/build-push-action@v3"
# with:
# context: .
# push: true
# tags: bwks/shazam:latest,bwks/shazam:v${{ needs.get-tag.outputs.pkg-version }}
# labels: ${{ steps.meta.outputs.labels }}