about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-03-21 17:18:21 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-03-24 19:23:04 +0000
commitcc570ae05c2ce6fc5d890953344394f65d102f93 (patch)
tree168e9f23112787ef96798d5599480617baac1ea4
parentccab9b0e84ed80e5c928a4272f7b4d39ae58408b (diff)
downloadrust-cc570ae05c2ce6fc5d890953344394f65d102f93.tar.gz
rust-cc570ae05c2ce6fc5d890953344394f65d102f93.zip
Publish a dev release on every commit
-rw-r--r--.github/workflows/main.yml40
-rw-r--r--Readme.md5
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