From cc570ae05c2ce6fc5d890953344394f65d102f93 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 21 Mar 2023 17:18:21 +0000 Subject: [PATCH] Publish a dev release on every commit --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ Readme.md | 5 ++--- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d472a4e270c..e4af73ea644 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -218,3 +218,43 @@ jobs: with: name: cg_clif-${{ runner.os }}-cross-x86_64-mingw path: cg_clif.tar.xz + + release: + runs-on: ubuntu-latest + timeout-minutes: 10 + if: ${{ github.ref == 'refs/heads/master' }} + needs: [rustfmt, test, bench, dist] + + concurrency: + group: release-dev + cancel-in-progress: true + + steps: + - uses: actions/checkout@v3 + + - name: Download all built artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts/ + + - run: | + ls -R artifacts/ + mkdir release/ + pushd artifacts/ + for dir in *; do + mv $dir/cg_clif.tar.xz ../release/$dir.tar.xz + rmdir $dir/ # verify $dir is empty + done + popd + rmdir artifacts/ # verify all artifacts are represented in release/ + ls -R release/ + + - run: npm install --production + working-directory: .github/actions/github-release + + - name: Publish Release + uses: ./.github/actions/github-release + with: + files: "release/*" + token: ${{ github.token }} + continue-on-error: true diff --git a/Readme.md b/Readme.md index b87a9dc51e8..c5222982aa7 100644 --- a/Readme.md +++ b/Readme.md @@ -22,10 +22,9 @@ $ ./test.sh For more docs on how to build and test see [build_system/usage.txt](build_system/usage.txt) or the help message of `./y.rs`. -Alternatively you can download a pre built version from [Github Actions]. It is listed in the artifacts section -of workflow runs. Unfortunately due to GHA restrictions you need to be logged in to access it. +Alternatively you can download a pre built version from the [releases] page. -[Github Actions]: https://github.com/bjorn3/rustc_codegen_cranelift/actions?query=branch%3Amaster+event%3Apush+is%3Asuccess +[releases]: https://github.com/bjorn3/rustc_codegen_cranelift/releases/tag/dev ## Usage