-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (34 loc) · 1.09 KB
/
release.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
name: Release
on:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Release
shell: bash
run: |
set -e
echo "Checkout the release branch"
git checkout origin/releases/v1
echo "Bring latest changes from main"
git reset --hard main
echo "Install dependencies"
npm install
echo "run build script"
npm run build
echo "Add the dist"
git config --global user.name 'Release Bot'
git config --global user.email '[email protected]'
git add .
echo "Commit"
git commit -m "v1"
echo "Force push to overwrite any previous commits for this branch"
git push -f origin releases/v1
echo "Remove previously pushed tags (v1 will be unusable momentarily until you re-push)"
git push origin :refs/tags/v1
echo "Re-apply the tag"
git tag -fa v1 -m "v1"
echo "Push everything"
git push origin v1