Skip to content

Release

Release #55

Workflow file for this run

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}}