Skip to content

Commit

Permalink
Publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gausie committed Oct 23, 2023
1 parent 4ec8421 commit e0dd864
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish package to NPM
on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"

- name: Check publish status
id: check
uses: tehpsalmist/npm-publish-status-action@v1

- name: Publish if necessary
if: ${{ steps.check.outputs.exists == '0' }}
run: |
yarn
yarn npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
},
"scripts": {
"build": "tsc",
"format": "prettier --write ."
"format": "prettier --write .",
"prepublishOnly": "yarn run build"
},
"dependencies": {}
}
2 changes: 1 addition & 1 deletion src/entityTypes/outfits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type Treat = {
};

const parseEquipment = (equipmentList = "") =>
equipmentList.trim().split(", ").map(decodeHTML);
equipmentList.trim().split(", ");

const parseTreats = (treatList = "") =>
treatList
Expand Down

0 comments on commit e0dd864

Please sign in to comment.