-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (75 loc) · 2.51 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
87
88
89
90
91
92
93
94
95
name: Release
on:
push:
branches:
- main
env:
FORCE_COLOR: true
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.release.outputs['version'] }}
pr: ${{ steps.release.outputs['pr'] }}
tag-name: ${{ steps.release.outputs['tag_name'] }}
release_created: ${{ steps.release.outputs['release_created'] }}
steps:
- name: Release with release-please
id: release
uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.RELEASE_TOKEN }}
config-file: .github/release-please/config.json
manifest-file: .github/release-please/manifest.json
- name: Show output from release-please
env:
RELEASE_PLEASE_OUTPUT: ${{ toJSON(steps.release.outputs) }}
run: echo "${RELEASE_PLEASE_OUTPUT}" | jq
upload-archive:
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
needs:
- release-please
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build archive
run: tar -czf module.tar.gz README.md
- name: Upload archive
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.release-please.outputs.tag-name }}
files: |
./module.tar.gz
#bump-version:
# if: needs.release-please.outputs.pr != null
# runs-on: builder
# needs:
# - release-please
# permissions:
# contents: write
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# ref: ${{ fromJson(needs.release-please.outputs.pr).headBranchName }}
# - name: Get version
# id: version
# run: |
# version="$(jq -r '.[]' .github/release-please/manifest.json)"
# echo "version=${version}" >> $GITHUB_OUTPUT
# - name: Setup Rust toolchain
# uses: actions-rust-lang/setup-rust-toolchain@v1
# - name: Install cargo-edit
# uses: baptiste0928/[email protected]
# with:
# crate: cargo-edit
# - name: Set version
# run: cargo set-version ${{ steps.version.outputs.version }}
# - name: Commit version bump
# uses: stefanzweifel/git-auto-commit-action@v5
# with:
# commit_message: "chore: Bump version to ${{ steps.version.outputs.version }}"
# branch: ${{ fromJson(needs.release-please.outputs.pr).headBranchName }}