Skip to content

Merge branch 'main' of github.com:simsustech/simple-site-generator #27

Merge branch 'main' of github.com:simsustech/simple-site-generator

Merge branch 'main' of github.com:simsustech/simple-site-generator #27

Workflow file for this run

name: Release
on:
push:
branches:
- main
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
if: github.repository == 'simsustech/simple-site-generator'
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Creating .npmrc
run: |
cat > .npmrc << EOF
//registry.npmjs.org/:_authToken=$NPM_TOKEN
//npm.simsus.tech/:_authToken=$SIMSUSTECH_NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
SIMSUSTECH_NPM_TOKEN: ${{ secrets.SIMSUSTECH_NPM_TOKEN }}
- name: Setup PNPM
uses: pnpm/[email protected]
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
registry-url: 'https://npm.simsus.tech'
scope: '@simsustech'
- name: Install dependencies
run: pnpm install
- name: Build Packages
run: pnpm run build
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm run publish
commit: 'chore: release package(s)'
title: 'chore: release package(s)'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Remove .npmrc
run: rm .npmrc