-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (58 loc) · 2.06 KB
/
postreleaser.yml
File metadata and controls
68 lines (58 loc) · 2.06 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Post release
on:
release:
types: [published]
permissions: write-all
env:
WARDUINO: 'warduino'
VERSIONNAME: ${{ github.ref_name }}
jobs:
bump-in-warduino:
runs-on: ubuntu-latest
steps:
# clone latch
- uses: actions/checkout@v4
# clone warduino
- uses: actions/checkout@v4
with:
repository: 'TOPLLab/WARDuino'
path: 'warduino'
ssh-key: ${{ secrets.WARDUINO_DEPLOY }}
# update package
- name: Bump latch version for WARDuino
run: |
rm ${GITHUB_WORKSPACE}/${WARDUINO}/tests/latch/*.tgz
npm i
npm run build
npm pack --pack-destination ${GITHUB_WORKSPACE}/${WARDUINO}/tests/latch/
# update package.json
- name: Update package.json in WARDuino
run: |
cd tests/latch
VERSION=${VERSIONNAME#v}
sed -i "s|\"latch\": \"file:./latch-[^\"]*\"|\"latch\": \"file:./latch-$VERSION.tgz\"|" package.json
working-directory: 'warduino'
env:
VERSION: $(echo "${{ github.ref }}" | sed -e 's:v\(.*\):\1:')
# commit
- name: Push changes
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add tests/latch/
VERSION=${VERSIONNAME#v}
git checkout -b bump/latch-$VERSION
git commit -m "⬆️ Bump latch version"
git push --set-upstream origin bump/latch-$VERSION
working-directory: 'warduino'
env:
VERSION: $(echo "${{ github.ref }}" | sed -e 's:v\(.*\):\1:')
# create pull request
- name: Create Pull Request
run: |
VERSION=${VERSIONNAME#v}
gh pr create --title "⬆️ Bump latch to $VERSIONNAME" --body "Bumping latch to \`$VERSIONNAME\`" --base main --head bump/latch-$VERSION --label dependencies
working-directory: 'warduino'
env:
VERSION: $(echo "${{ github.ref }}" | sed -e 's:v\(.*\):\1:')
GH_TOKEN: ${{ secrets.WARDUINO_LATCH }}