From 7854b72a678108c569538d21d8628acf06e3ae6a Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Sun, 5 Nov 2023 13:23:04 -0800 Subject: [PATCH 1/4] Add release flow. --- .github/workflows/release.yml | 18 ++++++++++++++++++ 1 file changed, 18 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..5d2fb85 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Release + +permissions: + contents: write + +on: + push: + tags: + - "v[0-9]+*" + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: moonrepo/setup-rust@v1 + - uses: moonrepo/build-proto-plugin@v0 From 752f2b896de737fa0dc413dbcc0096b1e3fe312f Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Sun, 5 Nov 2023 13:36:02 -0800 Subject: [PATCH 2/4] Disable cache. --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d2fb85..fa4c797 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,8 +11,12 @@ on: jobs: build: + name: Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: moonrepo/setup-rust@v1 + with: + cache: false + targets: wasm32-wasi - uses: moonrepo/build-proto-plugin@v0 From 50430110216c995e5a626beee4d2321d20cd427c Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Sun, 5 Nov 2023 14:24:26 -0800 Subject: [PATCH 3/4] Test creating. --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fa4c797..50f1e5a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,3 +20,11 @@ jobs: cache: false targets: wasm32-wasi - uses: moonrepo/build-proto-plugin@v0 + - uses: ncipollo/release-action@v1 + # if: ${{ github.event_name == 'push' }} + with: + artifactErrorsFailBuild: true + artifacts: builds/* + tag: "test" + prerelease: ${{ contains(github.ref_name, '.alpha') || contains(github.ref_name, '.beta') || contains(github.ref_name, '.rc') }} + skipIfReleaseExists: true From 310baa36fdf1c3c13597359f7ebceac35afa1911 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Sun, 5 Nov 2023 14:35:31 -0800 Subject: [PATCH 4/4] On push tag. --- .github/workflows/release.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 50f1e5a..683752b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,11 +20,10 @@ jobs: cache: false targets: wasm32-wasi - uses: moonrepo/build-proto-plugin@v0 - - uses: ncipollo/release-action@v1 - # if: ${{ github.event_name == 'push' }} + - if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }} + uses: ncipollo/release-action@v1 with: - artifactErrorsFailBuild: true artifacts: builds/* - tag: "test" - prerelease: ${{ contains(github.ref_name, '.alpha') || contains(github.ref_name, '.beta') || contains(github.ref_name, '.rc') }} + artifactErrorsFailBuild: true + prerelease: ${{ contains(github.ref_name, '-alpha') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-rc') }} skipIfReleaseExists: true