forked from aws-samples/eks-workshop-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.2 KB
/
Copy pathrelease.yaml
File metadata and controls
47 lines (45 loc) · 1.2 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
name: Release
on:
milestone:
types: [closed]
workflow_dispatch: {}
permissions:
id-token: write
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
submodules: recursive
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Release
working-directory: releaser
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MILESTONE_NUMBER: "${{ github.event.milestone.number }}"
run: |
npm install
npm run exec
- name: Set Git config
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Update stable branch
run: |
git checkout stable
git pull
git merge --no-ff main -m "Publish to stable"
git push
- name: Create snapshot
run: |
suffix=$(git rev-parse --short HEAD)
git checkout -b snapshot-${suffix}
git push origin snapshot-${suffix}