mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
a170e2c80c
Use WinGet to install `wingetcreate`, rather than using Invoke-WebRequest
57 lines
2.2 KiB
YAML
57 lines
2.2 KiB
YAML
# 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:
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
|
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 }}
|
|
- name: Install Snapcraft
|
|
run: sudo snap install snapcraft --classic
|
|
shell: bash
|
|
- 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
|
|
- name: Download Snap from Release
|
|
uses: robinraju/release-downloader@v1
|
|
with:
|
|
tag: ${{github.ref_name}}
|
|
fileName: "*.snap"
|
|
- name: Publish to Snapcraft
|
|
run: "task artifacts:snap:publish:${{ github.ref_name }}"
|
|
env:
|
|
SNAPCRAFT_STORE_CREDENTIALS: "${{secrets.SNAPCRAFT_LOGIN_CREDS}}"
|
|
shell: bash
|
|
bump-winget:
|
|
if: ${{ startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, 'beta') }}
|
|
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 }}
|
|
- name: Install wingetcreate
|
|
run: winget install wingetcreate
|
|
shell: pwsh
|
|
- name: Submit WinGet version bump
|
|
run: "task artifacts:winget:publish:${{ github.ref_name }}"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.WINGET_BUMP_PAT }}
|
|
shell: pwsh
|