Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove automatic npm releases from git workflow #19

Merged
merged 3 commits into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
strategy:
matrix:
# https://what-version-of-node.js.org/
node-version: [14.x, 16.x, 18.x] # remember to update this when support is added/dropped
node-version: [16.x, 18.x, 20.x] # remember to update this when support is added/dropped
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 16 # remember to update this when support is added/dropped
node-version: 18 # remember to update this when support is added/dropped
- run: npm ci
- run: npm run lint
- run: npm run test
Expand Down Expand Up @@ -53,18 +53,3 @@ jobs:
outputs:
releases_created: ${{steps.release.outputs.releases_created}}

npm-publish:
runs-on: ubuntu-latest
needs: [github-release]
if: ${{ needs.github-release.outputs.releases_created == 'true' }} # only publish to npm if a github release has been made
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16 # remember to update this when support is added/dropped
registry-url: "https://registry.npmjs.org"
- run: npm ci --production
- run: npm run build
- run: npm publish # SUPPORTING OLDER MAJOR VERSIONS: add a tag so that 'latest' tag isn't used, e.g. `npm publish --tag v1-latest`
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
strategy:
matrix:
# https://what-version-of-node.js.org/
node-version: [14.x, 16.x, 18.x] # remember to update this when support is added/dropped
node-version: [16.x, 18.x, 20.x] # remember to update this when support is added/dropped
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 16 # remember to update this when support is added/dropped
node-version: 18 # remember to update this when support is added/dropped
- run: npm ci
- run: npm run lint
- run: npm run test
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,7 @@ dist
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
.pnp.*

# macOS
.DS_Store