Skip to content

Commit

Permalink
ci: re-write publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrCai0907 committed Aug 23, 2023
1 parent f534879 commit ea2f378
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 106 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ name: publish

on:
push:
branches: ["main"]
tags:
- "*"

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
greater-version-only: true
node-version: "18.x"
- name: Install dependencies
run: npm ci

- run: npm version $(echo "${GITHUB_REF}" | sed 's/refs\/tags\///') --git-tag-version false
- run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish
10 changes: 0 additions & 10 deletions .npmignore

This file was deleted.

1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

85 changes: 0 additions & 85 deletions CHANGELOG.md

This file was deleted.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "assemblyscript-prettier",
"version": "2.0.2",
"version": "0.0.0",
"description": "prettier for assemblyscript",
"main": "src/plugin.js",
"type": "module",
Expand All @@ -9,7 +9,7 @@
"lint:fix": "prettier -w .",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"test:create": "NODE_OPTIONS=--experimental-vm-modules jest --updateSnapshot",
"version": "conventional-changelog -i CHANGELOG.md -s -p angular && git add CHANGELOG.md"
"version": "conventional-changelog -o CHANGELOG.md -p angular -r 0"
},
"author": "[email protected]",
"license": "MIT",
Expand All @@ -21,6 +21,12 @@
"publishConfig": {
"access": "public"
},
"files": [
"package.json",
"README.md",
"CHANGELOG.md",
"src/*"
],
"repository": {
"type": "git",
"url": "https://github.com/HerrCai0907/assemblyscript-prettier.git"
Expand Down

0 comments on commit ea2f378

Please sign in to comment.