Skip to content

Commit

Permalink
feat: change 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wujie committed Jan 13, 2024
1 parent 71279ad commit 59ee04f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name: Publish to npm

on:
workflow_run:
workflows: ["Run test"]
types:
- completed
push:
tags:
- '*'

jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- uses: actions/checkout@v2
Expand All @@ -20,6 +18,19 @@ jobs:
node-version: '14'
registry-url: 'https://registry.npmjs.org'

- name: Get version from tag
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: Install dependencies
run: npm install

- name: Run npm test
run: npm test

- name: Update version in package.json
run: npm version --allow-same-version --no-git-tag-version ${{ steps.get_version.outputs.VERSION }}

- name: Publish
run: npm publish
env:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "optimizerPlugin",
"version": "1.0.0",
"name": "optimizer-plugin",
"version": "1.0.1",
"description": "optimizerPlugin is a Babel plugin that optimizes code through static analysis. It is primarily written and documented by ChatGPT, while the user is responsible for writing test cases and verifying if the code effects meet expectations.",
"main": "index.js",
"bin": "ci/index.js",
Expand Down

0 comments on commit 59ee04f

Please sign in to comment.