Skip to content

ci(semantic relase): Basic setup #3

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

Merged
merged 5 commits into from
May 6, 2024
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
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