Skip to content

Commit 8826942

Browse files
committed
ci: automate releases with release-please
Signed-off-by: Aaron Cupp <mrcupp@mrcupp.com>
1 parent d461d28 commit 8826942

3 files changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
release-please:
13+
runs-on: ubuntu-24.04
14+
outputs:
15+
release_created: ${{ steps.release.outputs.release_created }}
16+
tag_name: ${{ steps.release.outputs.tag_name }}
17+
steps:
18+
- uses: googleapis/release-please-action@v4
19+
id: release
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
attach-assets:
24+
needs: release-please
25+
if: ${{ needs.release-please.outputs.release_created == 'true' }}
26+
runs-on: ubuntu-24.04
27+
permissions:
28+
contents: write
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Bundle brand kit
33+
run: |
34+
tag="${{ needs.release-please.outputs.tag_name }}"
35+
mkdir -p dist
36+
zip -r "dist/audiophore-brand-kit-${tag}.zip" logos BRANDING.md preview.html
37+
tar -czf "dist/audiophore-brand-kit-${tag}.tar.gz" logos BRANDING.md preview.html
38+
39+
- name: Upload bundle to the release
40+
env:
41+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
run: gh release upload "${{ needs.release-please.outputs.tag_name }}" dist/* --clobber

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.0"
3+
}

release-please-config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "simple",
6+
"package-name": "audiophore-brand-kit",
7+
"include-component-in-tag": false,
8+
"changelog-path": "CHANGELOG.md",
9+
"release-as": "1.0.0"
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)