mirror of
https://github.com/simple64/simple64.git
synced 2026-09-04 11:24:32 +02:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Upload snap
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
SNAPCRAFT_BUILD_ENVIRONMENT: host
|
|
PYTHON_VERSION: "3.9"
|
|
|
|
jobs:
|
|
build-snap:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
|
|
- name: Get snapcraft login
|
|
run: echo "$SNAPCRAFT_LOGIN" > $GITHUB_WORKSPACE/SNAPCRAFT_LOGIN.txt
|
|
env:
|
|
SNAPCRAFT_LOGIN: ${{ secrets.SNAPCRAFT_LOGIN }}
|
|
|
|
- name: Install snapcraft and login
|
|
run: |
|
|
sudo snap install snapcraft --classic
|
|
snapcraft login --with $GITHUB_WORKSPACE/SNAPCRAFT_LOGIN.txt
|
|
|
|
- name: Run snapcraft
|
|
run: |
|
|
pip install requests
|
|
export M64P_VERSION=$(python3 scripts/get_release_version.py)
|
|
export M64P_LINUX_URL=$(python3 scripts/get_linux_asset.py $M64P_VERSION)
|
|
sed -i "s~M64PVERSION~$M64P_VERSION~g" snap/snapcraft.yaml
|
|
sed -i "s~M64PURL~$M64P_LINUX_URL~g" snap/snapcraft.yaml
|
|
snapcraft
|
|
snapcraft upload --release=stable *.snap
|