-
Notifications
You must be signed in to change notification settings - Fork 614
89 lines (75 loc) · 2.48 KB
/
Copy pathrelease-please.yml
File metadata and controls
89 lines (75 loc) · 2.48 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: release-please
# Trigger on merges to 'master' branch
on:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
release-please:
name: Create Release
runs-on: ubuntu-latest
outputs:
release-pr: ${{ steps.release.outputs.pr }}
release-version: ${{ steps.release.outputs.tag_name }}
steps:
- name: Run Release Please
id: release
uses: google-github-actions/release-please-action@v3
with:
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
command: manifest
default-branch: ${{ env.BRANCH_NAME }}
update-docs:
name: Update docs
env:
GITHUB_TOKEN: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
needs: [release-please]
if: ${{ needs.release-please.outputs.release-pr }}
runs-on: ubuntu-latest
steps:
- name: Checkout release branch
uses: actions/checkout@v4
with:
ref: ${{ fromJSON(needs.release-please.outputs.release-pr).headBranchName }}
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
- name: Run corepack enable
run: corepack enable
- name: Configure Git
run: |
git config --global user.name AztecBot
git config --global user.email tech@aztecprotocol.com
- name: Build dependencies
run: |
for project in noir barretenberg l1-contracts yarn-project; do
CI=1 $project/bootstrap.sh
done
- name: Query new version
id: version
run: |
# Extract version from .release-please-manifest.json
AZTEC_VERSION=$(jq -r '."."' .release-please-manifest.json)
# Add v prefix
AZTEC_VERSION="v$AZTEC_VERSION"
echo "semver=$AZTEC_VERSION" >> $GITHUB_OUTPUT
- name: Cut version
working-directory: ./docs
run: |
COMMIT_TAG=${{ steps.version.outputs.semver }}
echo "[]" > versions.json
yarn
COMMIT_TAG=$COMMIT_TAG yarn build
COMMIT_TAG=$COMMIT_TAG yarn docusaurus docs:version ${{ steps.version.outputs.semver }}
- name: Update versions.json with new version
working-directory: ./docs/scripts
run: |
./update_versions.sh
- name: Commit new documentation version
run: |
git add .
git commit -m "chore(docs): cut new docs version for tag ${{ steps.version.outputs.semver }}"
git push