Skip to content

Commit

Permalink
workflow: add publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Chieffo2021 committed Dec 13, 2021
1 parent 184c72c commit 7ff2566
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '14'
registry-url: 'https://registry.npmjs.org'

- name: Install
run: npm install

- name: Build
run: npm run build

- name: Test
run: npm run test

- name: Create Release for Tag
id: release_tag
uses: yyx990803/release-tag@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
body: |
Please refer to [CHANGELOG.md](https://github.com/originjs/webpack-to-vite/blob/main/CHANGELOG.md) for details.
- name: Publish to npm registry
run: |
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@originjs/webpack-to-vite",
"version": "1.0.1",
"version": "1.0.2",
"description": "convert a webpack project to a vite project",
"main": "dist/bin/index.js",
"bin": {
Expand Down

0 comments on commit 7ff2566

Please sign in to comment.