0.0.8 #8
Workflow file for this run
This file contains hidden or 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: | |
| # push: | |
| # tags: | |
| # - 'v[0-9]+.[0-9]+.[0-9]+' | |
| 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@v4 | |
| with: | |
| name: upload_url | |
| path: upload_url | |
| build: | |
| needs: get-release | |
| strategy: | |
| matrix: | |
| platform: [ | |
| 'linux-arm', | |
| 'linux-arm64' | |
| ] | |
| pair: [ | |
| 'python:3.9', | |
| ] | |
| include: | |
| - platform: 'linux-arm' | |
| host-os: 'ubuntu-latest' | |
| - platform: 'linux-arm64' | |
| host-os: 'ubuntu-latest' | |
| - pair: 'python:3.9' | |
| language: 'python' | |
| version: '3.9' | |
| runs-on: ${{ matrix.host-os }} | |
| steps: | |
| - name: Download upload_url | |
| uses: actions/download-artifact@v4 | |
| 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 Node.js ${{ matrix.version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-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: buttoninput-${{ env.RELEASE_VERSION }}-${{ matrix.platform }}-v${{ matrix.version }}.tgz | |
| overwrite: true | |
| - 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: buttoninput-${{ env.RELEASE_VERSION }}-${{ matrix.platform }}-v${{ matrix.version }}.tgz.sha256sum | |
| overwrite: true |