-
Notifications
You must be signed in to change notification settings - Fork 24
65 lines (55 loc) · 2.73 KB
/
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
name: Release
on:
workflow_dispatch:
inputs:
signing_request_id:
required: true
description: Signing request ID
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- name: Download signed artifacts
id: download
run: |
curl -sSf -H "Authorization: Bearer ${{secrets.SIGNPATH_API_KEY}}" -o artifacts.zip https://app.signpath.io/API/v1/0e70cf92-49a1-4427-a800-b6bc5b497936/SigningRequests/${{inputs.signing_request_id}}/SignedArtifact
mkdir artifacts
unzip -q artifacts.zip -d artifacts
echo "version=$(cat artifacts/VERSION | tr -d '\r\n')" >> $GITHUB_OUTPUT
- name: Create archives
run: |
./0install.sh run https://apps.0install.net/0install/0template.xml 0install-win.xml.template version=${{steps.download.outputs.version}}
pushd group-policies
zip -9 ../artifacts/group-policies.zip *
popd
pushd artifacts/Bootstrap
zip -9 0install.zip 0install.exe 0install.exe.config 0install.ini
zip -9 zero-install.zip zero-install.exe zero-install.exe.config zero-install.ini
popd
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{steps.download.outputs.version}}
files: |
0install-win-${{steps.download.outputs.version}}.*
artifacts/Bootstrap/*.exe
artifacts/Bootstrap/*.zip
artifacts/Bootstrap/*.msi
body: |
**[Download Zero Install for Windows](https://get.0install.net/#windows)**
Based on [Zero Install .NET ${{steps.download.outputs.version}}](https://github.com/0install/0install-dotnet/releases/${{steps.download.outputs.version}}).
- name: Publish feed
env:
GH_TOKEN: ${{secrets.PERSONAL_TOKEN}}
run: >
gh workflow run --repo=0install/apps Incoming
-f feed_url=https://github.com/${{github.repository}}/releases/download/${{steps.download.outputs.version}}/0install-win-${{steps.download.outputs.version}}.xml
-f archive_url=https://github.com/${{github.repository}}/releases/download/${{steps.download.outputs.version}}/0install-win-${{steps.download.outputs.version}}.tar.gz
- name: Push Chocolatey package
run: dotnet nuget push artifacts/0install.chocolatey.*.nupkg --source https://push.chocolatey.org/ --api-key ${{secrets.CHOCOLATEY_API_KEY}}
- name: Push PowerShell Gallery package
run: dotnet nuget push artifacts/0install.powershell.*.nupkg --source https://www.powershellgallery.com/ --api-key ${{secrets.POWERSHELL_GALLERY_API_KEY}}