Files
aqtinstall/.github/workflows/upload-release-artifacts.yml
Dave Dalcino a998d4368b Pin checkout at v3 in all workflows
This fixes some CI warnings about using obsolete versions of NodeJS.
NodeJS 12 (from checkout@2) is at EOL, and CI warnings recommend using
NodeJS 16. The docs for actions/checkout recommend pinning at v3.

Some of these workflows were using `checkout@master`, and were thereby
already using NodeJS 16. I'm not sure that it's necessary to use v3
for these instead of master. However, the docs suggest using v3.
If at some point the authors decide to rename the `master` branch to
`main`, then we may be glad we made this change.
2023-02-11 11:31:23 -08:00

78 lines
2.5 KiB
YAML

# This will only run automatically when releases have been created,
# and will only upload binaries to previously-created releases.
# When run manually, it will overwrite the previous reelease binary
name: Upload release artifacts
on:
release:
types:
- created
workflow_dispatch:
jobs:
build-standalone:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
py: [3.9]
arch: [x86, x64]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 20
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}
architecture: ${{ matrix.arch }}
- name: Build standalone binary
run: |
python -m venv venv
venv/Scripts/activate.ps1
python -m pip install -U pip wheel setuptools setuptools_scm pyinstaller
python -m pip install .
python tools/build_standalone.py ${{ matrix.arch }}
deactivate
Remove-Item venv -Recurse -Force
shell: pwsh
- name: Upload to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist\aqt_x64.exe
asset_name: aqt.exe
tag: ${{ github.ref }}
overwrite: true
if: matrix.arch=='x64' && startsWith(github.ref, 'refs/tags/v')
- name: Upload to Release for all architectures
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist\aqt_${{ matrix.arch }}.exe
tag: ${{ github.ref }}
overwrite: true
if: startsWith(github.ref, 'refs/tags/v')
- name: Update continuous build
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
overwrite: true
prerelease: true
tag: Continuous
file: dist\aqt_x64.exe
asset_name: aqt.exe
if: matrix.arch=='x64' && startsWith(github.ref, 'refs/tags/v')
- name: Update continuous build for all architectures
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
overwrite: true
prerelease: true
tag: Continuous
file: dist\aqt_${{ matrix.arch }}.exe
if: startsWith(github.ref, 'refs/tags/v')