Skip to content

Commit

Permalink
ci: publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Feb 10, 2024
1 parent 5019aac commit 8a2a2ac
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 30 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,31 @@ jobs:
- name: Run type declaration tests
run: pnpm run test-dts

release:
concurrency:
group: release
if: github.repository == 'vuejs/core-vapor'
runs-on: ubuntu-latest
needs: [unit-test, lint-and-test-dts]
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- run: pnpm install

- run: pnpm release --vapor --skip-tests
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# benchmarks:
# runs-on: ubuntu-latest
# if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/release-tag.yml

This file was deleted.

6 changes: 3 additions & 3 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ let skipTests = args.skipTests
const skipBuild = args.skipBuild
const isCanary = args.canary
const isVapor = args.vapor
const skipPrompts = args.skipPrompts || args.canary
const skipGit = args.skipGit || args.canary
const skipPrompts = args.skipPrompts || args.canary || args.vapor
const skipGit = args.skipGit || args.canary || args.vapor

const packages = fs
.readdirSync(path.resolve(__dirname, '../packages'))
Expand Down Expand Up @@ -372,7 +372,7 @@ async function getCIResult() {
try {
const sha = await getSha()
const res = await fetch(
`https://api.github.com/repos/vuejs/core/actions/runs?head_sha=${sha}` +
`https://api.github.com/repos/vuejs/core-vapor/actions/runs?head_sha=${sha}` +
`&status=success&exclude_pull_requests=true`,
)
const data = await res.json()
Expand Down

0 comments on commit 8a2a2ac

Please sign in to comment.