generated from ekristen/go-project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (30 loc) · 1.03 KB
/
installers.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
name: installers
on:
workflow_dispatch:
release:
types: [published]
jobs:
generate-installers:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: set-version
run: |
sed -e "s/__VERSION__/${{ github.event.release.tag_name }}/" scripts/installer.tpl.sh > installer.sh
sed -e "s/__VERSION__/${{ github.event.release.tag_name }}/" scripts/installer.tpl.ps1 > installer.ps1
- name: generate-token
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
with:
app_id: ${{ secrets.BOT2_APP_ID }}
private_key: ${{ secrets.BOT2_APP_PEM }}
revoke: true
- name: upload
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2
with:
files: |
installer.sh
installer.ps1
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}