From 411fed35d3a41055edec253f381a4a516b794573 Mon Sep 17 00:00:00 2001 From: Ezekiel Warren Date: Sat, 22 Apr 2023 20:39:02 -0700 Subject: [PATCH] chore: release github action --- .github/workflows/release.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a448b1b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: release + +on: + release: + types: [published] + +jobs: + release-linux-x64-binary: + runs-on: ubuntu-latest + steps: + - uses: actions/cache@v3 + with: + path: | + ~/.cache/bazelisk + ~/.cache/bazel-disk-cache + key: ${{runner.os}}-bazel-cache + - uses: actions/checkout@v3 + - run: 'bazel build --config=ci //cli:ecsact_rtb' + - run: 'cp ./bazel-bin/cli/ecsact_rtb ecsact_rtb_${{ github.ref_name }}_linux_x64' + - run: 'gh release upload ${{ github.ref_name }} ecsact_rtb_${{ github.ref_name }}_linux_x64' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} + + release-windows-x64-binary: + runs-on: windows-latest + steps: + - uses: actions/cache@v3 + with: + path: | + /Users/runneradmin/AppData/Local/bazelisk + /Users/runneradmin/.cache/bazel-disk-cache + key: ${{runner.os}}-bazel-cache + - uses: actions/checkout@v3 + - run: 'bazel build --config=ci //cli:ecsact_rtb' + - run: 'Copy-Item .\bazel-bin\cli\ecsact_rtb.exe -Destination .\ecsact_rtb_${{ github.ref_name }}_windows_x64.exe' + - run: 'gh release upload ${{ github.ref_name }} ./ecsact_rtb_${{ github.ref_name }}_windows_x64.exe' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} +