-
Notifications
You must be signed in to change notification settings - Fork 14
35 lines (30 loc) · 1.44 KB
/
release-node.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# This action triggers a GitLab CI job that generates the release notes
name: Node Release
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 label "release-node"
if: ${{ github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release-node') }}
name: Need new release
strategy:
fail-fast: true
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Get Node Version
id: get-version
run: |
vers=$( cargo metadata --format-version=1 --no-deps | jq '.packages[] | select(.name == "pendulum-node") | .version' | tr -d '"' )
echo "version=${vers}" >> "$GITHUB_OUTPUT"
- name: trigger gitlab
run: |
ls ${{ github.workspace }}
curl -X POST -F "token=${{ secrets.GITLAB_TRIGGER }}" -F "ref=development" -F "variables[PREPCOMPILE]=Y" -F "variables[COMPILE]=Y" -F "variables[COMPILEMOONBEAM]=N" -F "variables[DOCKER]=Y" -F "variables[DOCKERAMP]=Y" -F "variables[DEBIAN]=Y" -F "variables[TEMPUPLOAD]=Y" -F "variables[DOWNUPLOAD]=Y" -F "variables[PRODUPLOAD]=Y" -F "variables[VERSION]=${{ steps.get-version.outputs.version }}" https://gitlab.com/api/v4/projects/${{ secrets.PROJECT_ID }}/trigger/pipeline