-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.67 KB
/
release-please.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
name: release-please
on:
push:
branches: [main]
jobs:
release_please:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
actions: write
statuses: write
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
command: manifest
- run: |
echo "paths_released: ${{ steps.release.outputs.paths_released }}"
echo "release_created: ${{ steps.release.outputs.paths_released != '[]' }}"
# - if: ${{ steps.release.outputs.release_created }}
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - if: ${{ steps.release.outputs.release_created }}
# uses: ./.github/workflows/upload-binaries.yml
# with:
# release: ${{ steps.release.outputs.tag_name }}
outputs:
release_created: ${{ steps.release.outputs.paths_released != '[]' }}
release:
name: Release to crates.io
runs-on: ubuntu-latest
if: needs.release_please.outputs.release_created == 'true'
needs: release_please
concurrency:
group: release
steps:
- name: Configure git
run: |
git config --global core.autocrlf false
git config --global core.symlinks true
git config --global fetch.parallel 32
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install cargo plugins
run: cargo install cargo-workspaces
- name: Publish
run: cargo workspaces publish --from-git --yes --token "${{ secrets.CRATES_IO_TOKEN }}"