-
Notifications
You must be signed in to change notification settings - Fork 4
78 lines (72 loc) · 1.96 KB
/
app-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
on:
workflow_call:
inputs:
pkg-name:
type: string
required: true
forge-name:
type: string
required: true
secrets:
api-key:
required: true
ssh-key:
required: true
update-homebrew:
required: false
jobs:
upload-release-pkgs:
name: Upload
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: release
- name: Save release packages
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ${{ inputs.pkg-name }}?*.*
file_glob: true
update-sourceforge:
name: "-"
needs: [ upload-release-pkgs ]
uses: ./.github/workflows/app-mirror-sourceforge.yml
with:
forge-name: ${{ inputs.forge-name }}
secrets:
api-key: ${{ secrets.api-key }}
ssh-key: ${{ secrets.ssh-key }}
publish-version:
name: Publish version
runs-on: ubuntu-latest
needs: [ update-sourceforge ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update version & docs
shell: bash
run: |
echo "${{ secrets.ssh-key }}" > ssh-key
chmod 0600 ssh-key
f=release/VERSION
if [[ -d release/doc ]]; then
f="$f release/doc/*"
fi
scp -o StrictHostKeyChecking=no -i ssh-key $f jafl,${{ inputs.forge-name }}@web.sourceforge.net:htdocs/;
update-homebrew:
name: Update Homebrew Formulas
runs-on: ubuntu-latest
needs: [ upload-release-pkgs ]
env:
homebrew_secret: ${{ secrets.update-homebrew }}
steps:
- name: Repository Dispatch
if: ${{ env.homebrew_secret != '' }}
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.update-homebrew }}
repository: jafl/homebrew-jx
event-type: new-release