2024-09-18 21:29:47 +02:00
|
|
|
# Workflow to copy artifacts from the staging bucket to the release bucket when a new GitHub Release is published.
|
|
|
|
|
|
|
|
name: Publish Release
|
|
|
|
run-name: Publish ${{ github.ref_name }}
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
jobs:
|
|
|
|
publish:
|
2024-10-23 23:04:16 +02:00
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
2024-09-18 21:29:47 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Task
|
|
|
|
uses: arduino/setup-task@v2
|
|
|
|
with:
|
|
|
|
version: 3.x
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2024-10-24 07:24:33 +02:00
|
|
|
- name: Install Snapcraft
|
2024-10-24 21:47:11 +02:00
|
|
|
run: sudo snap install snapcraft --classic
|
|
|
|
shell: bash
|
2024-09-18 21:29:47 +02:00
|
|
|
- name: Publish from staging
|
|
|
|
run: "task artifacts:publish:${{ github.ref_name }}"
|
|
|
|
env:
|
|
|
|
AWS_ACCESS_KEY_ID: "${{ secrets.PUBLISHER_KEY_ID }}"
|
|
|
|
AWS_SECRET_ACCESS_KEY: "${{ secrets.PUBLISHER_KEY_SECRET }}"
|
|
|
|
AWS_DEFAULT_REGION: us-west-2
|
|
|
|
shell: bash
|
2024-10-24 07:24:33 +02:00
|
|
|
- name: Download Snap from Release
|
2024-10-24 21:03:40 +02:00
|
|
|
uses: robinraju/release-downloader@v1
|
2024-10-24 07:24:33 +02:00
|
|
|
with:
|
|
|
|
tag: ${{github.ref_name}}
|
2024-10-24 21:03:40 +02:00
|
|
|
fileName: "*.snap"
|
2024-10-24 07:24:33 +02:00
|
|
|
- name: Publish to Snapcraft
|
2024-10-24 21:36:55 +02:00
|
|
|
run: "task artifacts:snap:publish:${{ github.ref_name }}"
|
2024-10-24 07:24:33 +02:00
|
|
|
env:
|
|
|
|
SNAPCRAFT_STORE_CREDENTIALS: "${{secrets.SNAPCRAFT_LOGIN_CREDS}}"
|
2024-10-24 21:47:11 +02:00
|
|
|
shell: bash
|
2024-10-23 23:04:16 +02:00
|
|
|
bump-winget:
|
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, 'beta') }}
|
2024-11-21 23:14:32 +01:00
|
|
|
needs: [publish]
|
2024-10-23 23:04:16 +02:00
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Task
|
|
|
|
uses: arduino/setup-task@v2
|
|
|
|
with:
|
|
|
|
version: 3.x
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2024-11-05 19:30:44 +01:00
|
|
|
- name: Install winget
|
|
|
|
uses: Cyberboss/install-winget@v1
|
2024-11-21 23:14:32 +01:00
|
|
|
with:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2024-10-29 06:45:13 +01:00
|
|
|
- name: Install wingetcreate
|
2024-11-21 23:14:32 +01:00
|
|
|
run: winget install -e --silent --accept-package-agreements --accept-source-agreements wingetcreate
|
2024-10-29 06:45:13 +01:00
|
|
|
shell: pwsh
|
2024-10-24 21:36:55 +02:00
|
|
|
- name: Submit WinGet version bump
|
|
|
|
run: "task artifacts:winget:publish:${{ github.ref_name }}"
|
2024-10-23 23:04:16 +02:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.WINGET_BUMP_PAT }}
|
|
|
|
shell: pwsh
|