-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.73 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
name: release
on:
push:
branches:
- main
- '[0-9]+.[0-9]+.x'
workflow_dispatch:
env:
REGISTRY: ghcr.io
GITHUB_PAGES_BRANCH: gh_pages
defaults:
run:
shell: bash
jobs:
release-please:
permissions:
contents: write # for google-github-actions/release-please-action to create release commit
pull-requests: write # for google-github-actions/release-please-action to create release PR
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
# Release-please creates a PR that tracks all changes
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
release:
permissions:
contents: write
needs: release-please
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [stable-x86_64-unknown-linux-gnu]
steps:
- uses: actions/checkout@master
- run: rustup toolchain install ${{ matrix.target }}
- name: Log in to Buf registry
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
run: |
cargo login --registry buf "Bearer $BUF_TOKEN"
- run: cargo +${{ matrix.target }} build --release
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/release/power_nerd