|
1 | 1 | name: release |
2 | 2 | on: |
3 | | - push: # for stable release |
| 3 | + pull_request: # for snapshot release |
4 | 4 | branches: |
5 | 5 | - main |
6 | 6 |
|
7 | | - pull_request: # for snapshot release |
| 7 | + push: # for stable release |
8 | 8 | branches: |
9 | 9 | - main |
10 | 10 |
|
11 | 11 | jobs: |
12 | 12 | release-snapshot: |
13 | | - runs-on: ubuntu-24.04 |
14 | 13 | if: github.event_name == 'pull_request' |
| 14 | + uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main |
15 | 15 | permissions: |
16 | 16 | id-token: write # allows ODIC publishing |
17 | | - # contents: read |
18 | | - steps: |
19 | | - - name: Check out repository |
20 | | - uses: actions/checkout@v4 |
21 | | - |
22 | | - - name: Set up Node.js |
23 | | - uses: actions/setup-node@v4 |
24 | | - with: |
25 | | - node-version: 24 |
26 | | - registry-url: 'https://registry.npmjs.org' |
27 | | - cache: yarn |
28 | | - cache-dependency-path: '**/yarn.lock' |
29 | | - |
30 | | - - run: yarn install --prefer-offline |
31 | | - |
32 | | - - name: Deploy snapshot |
33 | | - run: | |
34 | | - yarn changeset version --snapshot $RELEASE_TAG |
35 | | - yarn build |
36 | | - yarn changeset publish --tag alpha --no-git-tag |
37 | | - env: |
38 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
39 | | - RELEASE_TAG: test-run${{ github.run_number }}-${{ github.run_attempt }} |
40 | | - |
41 | | - # - name: Release Snapshot |
42 | | - # uses: 'the-guild-org/changesets-snapshot-action@v0.0.3' |
43 | | - # with: |
44 | | - # tag: alpha |
45 | | - # prepareScript: 'yarn build' |
46 | | - # env: |
47 | | - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub Token |
48 | | - # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # NPM Token |
49 | | - |
50 | | - # uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main |
51 | | - # permissions: |
52 | | - # id-token: write # allows ODIC publishing |
53 | | - # with: |
54 | | - # npmTag: alpha |
55 | | - # buildScript: build |
56 | | - # nodeVersion: 24 |
57 | | - # secrets: |
58 | | - # githubToken: ${{ secrets.GITHUB_TOKEN }} |
59 | | - # npmToken: ${{ secrets.NPM_TOKEN }} # FIXME: eddeee888 Required because the workflows requires it |
| 17 | + with: |
| 18 | + npmTag: alpha |
| 19 | + buildScript: build |
| 20 | + nodeVersion: 24 |
| 21 | + secrets: |
| 22 | + githubToken: ${{ secrets.GITHUB_TOKEN }} |
| 23 | + npmToken: FILLER |
60 | 24 |
|
61 | 25 | release-stable: |
62 | 26 | if: github.event_name == 'push' |
63 | 27 | uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main |
64 | | - # permissions: |
65 | | - # id-token: write # allows ODIC publishing |
| 28 | + permissions: |
| 29 | + id-token: write # allows ODIC publishing |
66 | 30 | with: |
67 | 31 | releaseScript: release |
68 | 32 | nodeVersion: 24 |
69 | 33 | secrets: |
70 | 34 | githubToken: ${{ secrets.GITHUB_TOKEN }} |
71 | | - npmToken: ${{ secrets.NPM_TOKEN }} |
| 35 | + npmToken: FILLER |
0 commit comments