Skip to content

Commit

Permalink
ci(semantic relase): Basic setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ff6347 committed May 6, 2024
1 parent 4986723 commit d49da08
Show file tree
Hide file tree
Showing 4 changed files with 7,153 additions and 19 deletions.
49 changes: 32 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
name: Publish package
name: Node.js CI
permissions:
contents: write
packages: write
on:
release:
types: [published]
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
env:
CI: true
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node
- uses: actions/checkout@v4
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
scope: '@extendscript'
- name: Install dependencies and build 🔧
run: npm ci && npm run build
- name: Publish package on Github 📦
run: npm publish
node-version-file: ".nvmrc"
- run: npm ci
- run: npm run build --if-present
- run: npm run test --if-present
release:
name: semantic-release
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: "20.x"
- run: |
npm ci
npx semantic-release --ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading

0 comments on commit d49da08

Please sign in to comment.