From 11e5e673627ffb3020c0a9fc162b85fc14abd098 Mon Sep 17 00:00:00 2001 From: Esa-Matti Suuronen Date: Sun, 29 Dec 2019 22:00:42 +0200 Subject: [PATCH] New release workflow --- .github/workflows/release.yml | 66 ++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0743667..06d40db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ on: push: - tags: - - "v*" + branches: + - "release/v*" name: Make Release @@ -15,6 +15,11 @@ jobs: steps: - uses: actions/checkout@master + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: 12 + - name: Add x86_64-unknown-linux-musl target uses: actions-rs/toolchain@v1 with: @@ -23,36 +28,33 @@ jobs: override: true - name: Build with Cargo - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --target x86_64-unknown-linux-musl + run: | + env + cargo build --release --target x86_64-unknown-linux-musl - name: Optimize binary size run: strip ${{ env.binary_path }} - - - name: Create Gitub Release - id: create_release - uses: actions/create-release@v1.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - draft: false - prerelease: false - - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - # This pulls from the CREATE RELEASE step above, - # referencing it's ID to get its outputs object, which - # include a `upload_url`. See this blog post for more info: - # https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ env.binary_path }} - asset_name: multip-amd64 - asset_content_type: application/octet-stream + # - name: Create Gitub Release + # id: create_release + # uses: actions/create-release@v1.0.0 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # tag_name: ${{ github.ref }} + # release_name: ${{ github.ref }} + # draft: false + # prerelease: false + # - name: Upload Release Asset + # id: upload-release-asset + # uses: actions/upload-release-asset@v1.0.1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # # This pulls from the CREATE RELEASE step above, + # # referencing it's ID to get its outputs object, which + # # include a `upload_url`. See this blog post for more info: + # # https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: ${{ env.binary_path }} + # asset_name: multip-amd64 + # asset_content_type: application/octet-stream