Skip to content

Commit

Permalink
ci: isolate publish token and simplify workflows (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
sparten11740 committed Mar 19, 2024
1 parent 991a083 commit e728aa3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 36 deletions.
26 changes: 4 additions & 22 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: ExodusMovement/actions/setup/yarn-berry@65b395a82884455e8dc0cbc32355d8864f1ec30c
with:
node-version-file: '.nvmrc'
- name: Allow read access to private registry
run: yarn config set --home 'npmRegistries["//registry.npmjs.org/"].npmAuthToken' "${{ secrets.NPM_TOKEN }}"
- name: Restore yarn cache
uses: actions/cache@v4
with:
path: .yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
npm-token: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: yarn install --immutable
- name: Lint
Expand All @@ -37,18 +28,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Allow read access to private registry
run: yarn config set --home 'npmRegistries["//registry.npmjs.org/"].npmAuthToken' "${{ secrets.NPM_TOKEN }}"
- name: Restore yarn cache
uses: actions/cache@v4
- uses: ExodusMovement/actions/setup/yarn-berry@65b395a82884455e8dc0cbc32355d8864f1ec30c
with:
path: .yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
npm-token: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: yarn install --immutable
- name: Test
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,17 @@ on:

jobs:
publish:
environment: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: ExodusMovement/actions/setup/yarn-berry@65b395a82884455e8dc0cbc32355d8864f1ec30c
with:
node-version: 16
cache: 'yarn'
- name: Restore yarn cache
uses: actions/cache@v3
with:
path: .yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Allow access to private registry
run: yarn config set --home 'npmRegistries["//registry.npmjs.org/"].npmAuthToken' "${{ secrets.NPM_TOKEN }}"
npm-token: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: yarn install --immutable
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: yarn semantic-release

0 comments on commit e728aa3

Please sign in to comment.