Release #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} | |
cd 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 | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
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}} |