Skip to content

Commit

Permalink
Merge pull request #3 from ExtendScript/ci/release-config
Browse files Browse the repository at this point in the history
ci(semantic relase): Basic setup
  • Loading branch information
ff6347 authored May 6, 2024
2 parents 4986723 + aa453fe commit 97a696e
Show file tree
Hide file tree
Showing 4 changed files with 7,158 additions and 17 deletions.
50 changes: 36 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,47 @@
name: Publish package
name: Node.js CI
permissions:
contents: write
packages: write
on:
release:
types: [published]
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
env:
CI: true
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: npm ci
- name: Build 🔧
run: npm run build --if-present
- name: Test
run: npm run test --if-present
release:
name: semantic-release
needs: [build]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node
with:
persist-credentials: false
- name: Setup Node.Js
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
- name: Publish package 📦
run: |
npm ci
npx semantic-release --ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading

0 comments on commit 97a696e

Please sign in to comment.