Skip to content
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

Release workflow #5

Closed
wants to merge 1 commit into from
Closed
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
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on:
push:
tags:
- "v*"

jobs:
release:
name: publish to npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Install packages
run: pnpm i --ignore-scripts
- name: Release check&build
run: pnpm check
- name: Setup npm auth
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" >> ~/.npmrc
npm whoami
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Registry release
run: pnpm publish -r --ignore-scripts --access public --filter "@location-state/*"
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "location-state",
"private": true,
"version": "0.0.0-alpha",
"description": "A lightweight state management library that saves and restores state based on history.",
"main": "index.js",
"engines": {
"pnpm": "8.x",
"npm": "please_use_pnpm_instead"
Expand Down
4 changes: 4 additions & 0 deletions packages/location-state-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "@location-state/core",
"version": "0.0.0-alpha",
"publishConfig": {
"access": "public"
},
"repository": "https://github.com/recruit-tech/location-state",
"files": [
"dist",
"types",
Expand Down
4 changes: 4 additions & 0 deletions packages/location-state-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "@location-state/next",
"version": "0.0.0-alpha",
"publishConfig": {
"access": "public"
},
"repository": "https://github.com/recruit-tech/location-state",
"files": [
"dist",
"types",
Expand Down
1 change: 1 addition & 0 deletions packages/test-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "test-utils",
"version": "0.0.0",
"private": true,
"main": "./src/index.ts",
"types": "./src/index.ts",
Expand Down
1 change: 0 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"dependsOn": ["dts"]
},
"test": {
"dependsOn": ["build"],
"outputs": ["coverage/**"]
}
},
Expand Down