This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
74 lines (68 loc) · 2.56 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
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Release Please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
hello-react--tag_name: ${{ steps.release.outputs.hello-react--tag_name}}
hello-react--release_created: ${{ steps.release.outputs.hello-react--release_created}}
hello-rust--tag_name: ${{ steps.release.outputs.hello-rust--tag_name}}
hello-rust--release_created: ${{ steps.release.outputs.hello-rust--release_created}}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
- name: Print release outputs for debugging
continue-on-error: true
run: |
echo "Release outputs:"
echo "${{ toJson(steps.release.outputs) }}"
release-hello-react:
if: ${{needs.release-please.outputs.hello-react--release_created}}
runs-on: ubuntu-latest
needs: release-please
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node-env
with:
node-version: 18
cache-path: hello-react/node_modules
cache-key: "${{hashFiles('hello-react/package-lock.json')}}"
project: hello-react
- run: npm test --prefix hello-react -- a --watchAll=false
- run: npm run build --prefix hello-react
- run: zip -r hello-react-build.zip hello-react/build
- name: Upload Release Artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release-please.outputs.hello-react--tag_name }} hello-react-build.zip
release-hello-rust:
if: ${{needs.release-please.outputs.hello-rust--release_created}}
runs-on: ubuntu-latest
needs: release-please
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Test
uses: clechasseur/rs-cargo@v2
with:
command: test
args: --verbose --manifest-path hello-rust/Cargo.toml
- name: Build
uses: clechasseur/rs-cargo@v2
with:
command: build
args: --verbose --release --manifest-path hello-rust/Cargo.toml --target x86_64-unknown-linux-gnu
- name: Upload Release Artifact
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release-please.outputs.hello-rust--tag_name }} hello-rust/target/x86_64-unknown-linux-gnu/release/hello_rust