Skip to content

Commit d42c8ad

Browse files
committed
Apply ideal config
1 parent 1af816b commit d42c8ad

1 file changed

Lines changed: 13 additions & 49 deletions

File tree

.github/workflows/release.yaml

Lines changed: 13 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,35 @@
11
name: release
22
on:
3-
push: # for stable release
3+
pull_request: # for snapshot release
44
branches:
55
- main
66

7-
pull_request: # for snapshot release
7+
push: # for stable release
88
branches:
99
- main
1010

1111
jobs:
1212
release-snapshot:
13-
runs-on: ubuntu-24.04
1413
if: github.event_name == 'pull_request'
14+
uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
1515
permissions:
1616
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
6024

6125
release-stable:
6226
if: github.event_name == 'push'
6327
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
6630
with:
6731
releaseScript: release
6832
nodeVersion: 24
6933
secrets:
7034
githubToken: ${{ secrets.GITHUB_TOKEN }}
71-
npmToken: ${{ secrets.NPM_TOKEN }}
35+
npmToken: FILLER

0 commit comments

Comments
 (0)