Skip to content

Commit 451fd8c

Browse files
committed
feat: add automated releases with release-please and FAP upload
1 parent ae948ef commit 451fd8c

4 files changed

Lines changed: 59 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
pull_request:
6+
workflow_call:
47

58
jobs:
69
test:

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
ci:
13+
uses: ./.github/workflows/ci.yml
14+
15+
release:
16+
needs: ci
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: googleapis/release-please-action@v4
20+
id: release
21+
with:
22+
config-file: release-please-config.json
23+
manifest-file: .release-please-manifest.json
24+
25+
- uses: actions/checkout@v4
26+
if: ${{ steps.release.outputs.release_created }}
27+
28+
- uses: actions/setup-python@v5
29+
if: ${{ steps.release.outputs.release_created }}
30+
with:
31+
python-version: "3.x"
32+
33+
- name: Build FAP
34+
if: ${{ steps.release.outputs.release_created }}
35+
run: |
36+
pip install ufbt
37+
ufbt
38+
39+
- name: Upload FAP to release
40+
if: ${{ steps.release.outputs.release_created }}
41+
env:
42+
GH_TOKEN: ${{ github.token }}
43+
run: gh release upload ${{ steps.release.outputs.tag_name }} dist/sub_dup_finder.fap

.release-please-manifest.json

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

release-please-config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"packages": {
3+
".": {
4+
"release-type": "simple",
5+
"bump-minor-pre-major": true,
6+
"bump-patch-for-minor-pre-major": true
7+
}
8+
}
9+
}

0 commit comments

Comments
 (0)