From f8bbfb22beceb542efde6bb138c48b28337b02f1 Mon Sep 17 00:00:00 2001 From: Ilya Bylich Date: Thu, 9 Dec 2021 19:26:13 +0300 Subject: [PATCH] added release workflow --- .github/workflows/release.yml | 56 +++++++++++++++++++++ .github/workflows/shared-build-and-test.yml | 2 +- 2 files changed, 57 insertions(+), 1 deletion(-) 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..e4c80cc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,56 @@ +name: release + +on: + push: + tags: + - 'v*' + +defaults: + run: + shell: bash + +jobs: + build-web: + name: build web + uses: lib-ruby-parser/wasm-bindings/.github/workflows/shared-build-and-test.yml@master + with: + node: '15' + target: no-modules + env: web + + build-node: + name: build node + uses: lib-ruby-parser/wasm-bindings/.github/workflows/shared-build-and-test.yml@master + with: + node: '15' + target: nodejs + env: nodejs + + create-release: + needs: ['build-web', 'build-node'] + name: create release + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + + - uses: actions/download-artifact@v2 + with: { name: web-lib-ruby-parser.js } + - uses: actions/download-artifact@v2 + with: { name: web-lib-ruby-parser.wasm } + - uses: actions/download-artifact@v2 + with: { name: nodejs-lib-ruby-parser.js } + - uses: actions/download-artifact@v2 + with: { name: nodejs-lib-ruby-parser.wasm } + + - name: show artifacts + run: ls -l + + - name: release + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + artifactErrorsFailBuild: true + artifacts: "web-lib-ruby-parser.*,nodejs-lib-ruby-parser.*" + token: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/shared-build-and-test.yml b/.github/workflows/shared-build-and-test.yml index 9b0f84e..d2275d8 100644 --- a/.github/workflows/shared-build-and-test.yml +++ b/.github/workflows/shared-build-and-test.yml @@ -24,7 +24,7 @@ defaults: jobs: build-and-test: - name: build and upload ${{ inputs.target }} + name: build, test and upload ${{ inputs.target }} runs-on: ubuntu-latest env: TARGET: ${{ inputs.target }}