-
-
Notifications
You must be signed in to change notification settings - Fork 88
91 lines (80 loc) · 2.67 KB
/
Copy pathrelease-app.yaml
File metadata and controls
91 lines (80 loc) · 2.67 KB
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
name: Release App
permissions:
attestations: write
contents: write
id-token: write
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to publish (e.g. v1.0.0.0 or v1.0.0.0-rc.1)'
required: true
concurrency:
group: release-app
cancel-in-progress: true
jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
if: github.repository_owner == 'researchxxl'
steps:
- name: Code checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag }}
- name: Ensure release branch
run: |
git config --global --add safe.directory '*'
if ! git branch -a --contains $(git rev-parse HEAD) | grep release >/dev/null; then
echo "Tag is not part of release branch - aborting..."
exit 1
fi
build1:
name: Build 1
needs: prepare
uses: ./.github/workflows/common-build.yaml
with:
applicationId: "com.github.catfriend1.syncthingfork"
buildType: "Release"
checkoutRef: ${{ github.event.inputs.tag }}
sign1:
name: Sign 1
needs: [prepare, build1]
uses: ./.github/workflows/common-sign.yaml
with:
applicationId: "com.github.catfriend1.syncthingfork"
buildType: "release"
environmentName: prod
secrets: inherit
release:
name: Create release and attach artifacts
needs: [sign1]
if: ${{ github.event.inputs.tag != '' }}
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag }}
- name: "Download sign1"
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: signed-com.github.catfriend1.syncthingfork
path: ./artifacts
- name: Create GitHub build provenance attestations
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
if: github.repository_owner == 'researchxxl'
with:
subject-path: ./artifacts/*
- name: Create draft release
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
with:
tag: ${{ github.event.inputs.tag }}
artifacts: "./artifacts/*.apk"
artifactErrorsFailBuild: true
name: Syncthing-Fork ${{ github.event.inputs.tag }}
bodyFile: "app/src/main/play/release-notes/en-US/default.txt"
prerelease: ${{ contains(github.event.inputs.tag, '-rc.') }}
draft: true