Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: dist | |
on: | |
pull_request: | |
push: | |
# branches: | |
# - main | |
# tags: | |
# - '*' | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: psf/black@stable | |
build-whl: | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- uses: robotpy/build-actions/install-pure-build-deps@v2021 | |
- uses: robotpy/build-actions/build-wheel@v2021 | |
- uses: robotpy/build-actions/test-native-wheel@v2021 | |
- uses: robotpy/build-actions/validate-sphinx@v2021 | |
build-exe: | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- shell: bash | |
run: | | |
./build_exe.sh | |
rm -f dist/windows/pynetworktables2js.exe | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: dist | |
publish-pypi: | |
runs-on: ubuntu-18.04 | |
needs: [check, build-whl, build-exe] | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- run: pip install wheel | |
- name: Build packages | |
run: python setup.py sdist bdist_wheel | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} | |
publish-github: | |
runs-on: ubuntu-18.04 | |
needs: [check, build-whl, build-exe] | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
steps: | |
- uses: actions/[email protected] | |
with: | |
name: dist | |
path: dist/ | |
- name: "Determine tag" | |
id: "determine-tag" | |
shell: bash | |
run: "echo \"::set-output name=tag::${GITHUB_REF#refs/tags/}\"" | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} | |
with: | |
tag_name: ${{ steps.determine-tag.outputs.tag }} | |
release_name: Release ${{ steps.determine-tag.outputs.tag }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./dist/pynetworktables2js-${{ steps.determine-tag.outputs.tag }}.zip | |
asset_name: pynetworktables2js-${{ steps.determine-tag.outputs.tag }}.zip | |
asset_content_type: application/zip |