Actions: bump versions

- actions/setup-python@v4
- Use pypa/gh-action-pypi-publish@v1
  this fix a warning:
  You are using "pypa/gh-action-pypi-publish@master".
  The "master" branch of this project has been sunset
  and will not receive any updates, not even security
  bug fixes.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
Hiroshi Miura
2022-09-30 08:56:58 +09:00
parent 4491e6b482
commit bc76ee5bac
5 changed files with 82 additions and 85 deletions

View File

@@ -26,10 +26,10 @@ jobs:
branchtomerge: "origin/master" branchtomerge: "origin/master"
branch: "update-combinations" branch: "update-combinations"
- name: Set up Python 3.8 - name: Set up Python 3.9
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: 3.8 python-version: '3.9'
- name: Build and install - name: Build and install
run: | run: |

View File

@@ -21,9 +21,9 @@ jobs:
fetch-depth: 20 fetch-depth: 20
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python 3.9 - name: Set up Python 3.9
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: 3.9 python-version: '3.9'
- name: Install tools - name: Install tools
run: | run: |
pip install -U pip pip install -U pip

View File

@@ -21,9 +21,9 @@ jobs:
- name: Fetch release tag - name: Fetch release tag
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python 3.7🐍 - name: Set up Python 3.7🐍
uses: actions/setup-python@v1 uses: actions/setup-python@v4
with: with:
python-version: 3.7 python-version: '3.9'
- name: Install build and twine - name: Install build and twine
run: python -m pip install build twine --user run: python -m pip install build twine --user
- name: Build release assets - name: Build release assets
@@ -32,12 +32,12 @@ jobs:
run: python -m twine check dist/* run: python -m twine check dist/*
- name: Publish distribution 📦 to Test PyPI when releases branch - name: Publish distribution 📦 to Test PyPI when releases branch
if: ${{ startsWith(github.event.ref, 'refs/heads/releases') }} if: ${{ startsWith(github.event.ref, 'refs/heads/releases') }}
uses: pypa/gh-action-pypi-publish@master uses: pypa/gh-action-pypi-publish@v1
with: with:
password: ${{ secrets.testpypi_password }} password: ${{ secrets.testpypi_password }}
repository_url: https://test.pypi.org/legacy/ repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI - name: Publish distribution 📦 to PyPI
if: ${{ startsWith(github.event.ref, 'refs/tags') }} if: ${{ startsWith(github.event.ref, 'refs/tags') }}
uses: pypa/gh-action-pypi-publish@master uses: pypa/gh-action-pypi-publish@v1
with: with:
password: ${{ secrets.pypi_password }} password: ${{ secrets.pypi_password }}

View File

@@ -30,7 +30,7 @@ jobs:
fetch-depth: 20 fetch-depth: 20
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: ${{ matrix.py }} python-version: ${{ matrix.py }}
- name: Run pytest - name: Run pytest

View File

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