2.1.4 #20
Workflow file for this run
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: Release | |
on: | |
release: | |
types: [created] | |
jobs: | |
get-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Dump upload url to file | |
run: echo '${{ steps.get_release.outputs.upload_url }}' > upload_url | |
- name: Upload upload_url | |
uses: actions/upload-artifact@v3 | |
with: | |
name: upload_url | |
path: upload_url | |
build: | |
needs: get-release | |
strategy: | |
matrix: | |
platform: [ | |
'linux-arm', | |
'linux-arm64', | |
# 'linux-x64', | |
] | |
pair: [ | |
# 'python:3.7', | |
'python:3.9', | |
] | |
include: | |
- platform: 'linux-arm' | |
host-os: 'ubuntu-latest' | |
- platform: 'linux-arm64' | |
host-os: 'ubuntu-latest' | |
# - platform: 'linux-x64' | |
# host-os: 'ubuntu-latest' | |
# - pair: 'python:3.7' | |
# language: 'python' | |
# version: '3.7' | |
- pair: 'python:3.9' | |
language: 'python' | |
version: '3.9' | |
runs-on: ${{ matrix.host-os }} | |
steps: | |
- name: Download upload_url | |
uses: actions/download-artifact@v3 | |
with: | |
name: upload_url | |
path: upload_url | |
- name: Set upload_url | |
run: echo "UPLOAD_URL=$(cat upload_url/upload_url)" >> $GITHUB_ENV | |
- name: Set release version | |
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV | |
- uses: actions/checkout@v3 | |
- name: Use Python ${{ matrix.version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.version }} | |
- name: Make build script executable | |
run: chmod +x ./build.sh | |
- name: Make packaging script executable | |
run: chmod +x ./package.sh | |
- name: Build adapter | |
run: | | |
./build.sh "${{ matrix.platform }}" "${{ matrix.language }}" "${{ matrix.version }}" | |
shell: bash | |
- name: Upload Release Asset tgz | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
#upload_url: ${{ github.event.release.upload_url }} | |
upload_url: ${{ env.UPLOAD_URL }} | |
asset_path: network-presence-detection-adapter-${{ env.RELEASE_VERSION }}-${{ matrix.platform }}-v${{ matrix.version }}.tgz | |
- name: Upload Release Asset shasum | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
#upload_url: ${{ github.event.release.upload_url }} | |
upload_url: ${{ env.UPLOAD_URL }} | |
asset_path: network-presence-detection-adapter-${{ env.RELEASE_VERSION }}-${{ matrix.platform }}-v${{ matrix.version }}.tgz.sha256sum | |