Skip to content

Commit

Permalink
170 Call Gitlab CI job to Automate Runtime Release (#430)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
b-yap authored Jun 17, 2024
1 parent 47b0666 commit 29e540a
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 29e540a

Please sign in to comment.