From 29e540a786ebc00b2ba8c6c876479e5a04a6ab34 Mon Sep 17 00:00:00 2001 From: "B. Yap" <2826165+b-yap@users.noreply.github.com> Date: Mon, 17 Jun 2024 17:43:44 +0800 Subject: [PATCH] 170 Call Gitlab CI job to Automate Runtime Release (#430) * added a script for cleaning up commits and the srtool * update the yml to run only on push * rename to srtool-build.yml; ONLY performs srtool build. * remove sub-directories show only info of compressed-wasm * add the script for auth upgrade * add comments and rename job names * remove unnecessary loc in the js code * update js code * update js code * new release yml file * remove unused scripts * add the correct gitlab id * test gitlab id * try to run * try to run * use another gitlab trigger api * remove useless lines * use mb-wali/gitlab-cd-trigger@main github actions * wrap with double quote * wrap with single quote * wrap with double quote * back with eic but wrap env result with double quote * use + sign * Test pendulum * final yaml file * remove old release yaml file * uncomment if statement --- .github/workflows/release.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 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 000000000..b455b2dc1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +# This action triggers a GitLab CI job that performs the following: +# * Srtool Check +# * Subwasm info of the compressed wasm file +# * Propose a Parachain Upgrade +# * Generate Release Notes +name: Release and Propose an Upgrade + +on: + pull_request: + types: + - closed + branches: + - 'main' + +jobs: + release_check: +# This job will only run if: +# * the pull request is closed and merged to main branch; +# * the pull request has the "release:" in its title + if: ${{ github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'release:') }} + name: ${{ matrix.chain }} need new release + strategy: + fail-fast: true + matrix: + chain: ["AMPLITUDE", "PENDULUM"] +# The job will run for Amplitude IF the pull request has the "amplitude" in its title + shouldReleaseAmp: + - ${{ contains(github.event.pull_request.title, 'amplitude') }} +# The job will run for Pendulum IF the pull request has the "pendulum" in its title + shouldReleasePen: + - ${{ contains(github.event.pull_request.title, 'pendulum') }} + exclude: + - shouldReleaseAmp: false + chain: "AMPLITUDE" + - shouldReleasePen: false + chain: "PENDULUM" + runs-on: ubuntu-latest + + steps: + - name: trigger gitlab + uses: eic/trigger-gitlab-ci@v1 + with: + url: https://gitlab.com + project_id: 56492543 + token: ${{ secrets.GITLABAPI }} + ref_name: main + variables: | + ${{ matrix.chain }}=Y