# Based on the https://github.com/actions/upload-release-asset example on: push: # Sequence of patterns matched against refs/tags tags: - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 name: Upload Release Asset jobs: build: name: Upload Release Asset runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Build assets run: | make release-assets - id: name run: | echo "::set-output name=tarball::$(ls *.tar.gz)" echo "::set-output name=zip::$(ls *.zip)" - name: Create Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} draft: true prerelease: true - name: Upload tarball uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ${{ steps.name.outputs.tarball }} asset_name: amalgamated.tar.gz # asset_label: Amalgamated source tarball asset_content_type: application/tar+gzip - name: Upload zip uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ${{ steps.name.outputs.zip }} asset_name: amalgamated.zip # asset_label: Amalgamated source zip-archive asset_content_type: application/zip