update workflow
This commit is contained in:
parent
e33707f8cb
commit
bbd0c81619
|
@ -1,29 +1,38 @@
|
|||
name: Release
|
||||
name: Changesets
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
||||
permissions: {} #reset
|
||||
env:
|
||||
CI: true
|
||||
PNPM_CACHE_FOLDER: .pnpm-store
|
||||
jobs:
|
||||
release:
|
||||
# IMPORTANT: prevent this action from running on forks
|
||||
if: github.repository == 'MatthiesenXYZ/astro-ghostcms'
|
||||
permissions:
|
||||
contents: write # to create release (changesets/action)
|
||||
pull-requests: write # to create pull request (changesets/action)
|
||||
name: Release
|
||||
version:
|
||||
timeout-minutes: 15
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- name: checkout code repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
node-version: 20
|
||||
- name: Publish to npm
|
||||
id: changesets
|
||||
fetch-depth: 0
|
||||
- name: setup node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 14
|
||||
- name: install pnpm
|
||||
run: npm i pnpm@latest -g
|
||||
- name: Setup npmrc
|
||||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
|
||||
- name: setup pnpm config
|
||||
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
|
||||
- name: install dependencies
|
||||
run: pnpm install
|
||||
- name: create and publish versions
|
||||
uses: changesets/action@v1
|
||||
with:
|
||||
publish: npm run release
|
||||
version: pnpm ci:version
|
||||
commit: "chore: update versions"
|
||||
title: "chore: update versions"
|
||||
publish: pnpm ci:publish
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
},
|
||||
"scripts": {
|
||||
"lint": "biome check .",
|
||||
"changeset": "changeset",
|
||||
"release": "changeset publish",
|
||||
"ci:version": "pnpm changeset version",
|
||||
"vi:publish": "pnpm changeset publish",
|
||||
"lint:fix": "biome check --apply .",
|
||||
"playground:dev": "pnpm --filter playground dev",
|
||||
"api:test": "pnpm --filter astro-ghostcms test",
|
||||
|
|
Loading…
Reference in New Issue