From 7d2c7a9f209188291ad6490aa429a9652488d49d Mon Sep 17 00:00:00 2001 From: MewX Date: Sat, 29 Aug 2020 03:28:15 +1000 Subject: [PATCH] Added auto asset uploader --- .github/workflows/release.yml | 21 +++++++++++++++++++++ CHANGELOG.md | 3 +++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8aba2d..f762982 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,3 +25,24 @@ jobs: Automatic Release by GitHub Workflow draft: false prerelease: false + - name: Install Bazel + run: | + wget https://github.com/bazelbuild/bazel/releases/download/3.4.1/bazel_3.4.1-linux-x86_64.deb + wget https://github.com/bazelbuild/bazel/releases/download/3.4.1/bazel_3.4.1-linux-x86_64.deb.sha256 + sha256sum -c bazel_3.4.1-linux-x86_64.deb.sha256 + sudo dpkg -i bazel_3.4.1-linux-x86_64.deb + - name: Build Release Assets + run: | + bazel build :doubak + mkdir releases + cp ./bazel-bin/doubak_/doubak releases/doubak-linux-x64 + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # 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 + asset_path: ./releases/doubak-linux-x64 + asset_name: doubak-linux-x64 + asset_content_type: application/x-binary diff --git a/CHANGELOG.md b/CHANGELOG.md index ed8fbcf..ad5b9a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +# v0.2 +Adding uploading feature for auto releaser. + # v0.1 Initial dummy version.