Skip to content

Commit

Permalink
add releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric committed Apr 25, 2023
1 parent 51d18a9 commit 5d375dd
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/releases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Node.js Package
env:
APPVERSION: v1.0.${{ github.run_number }}
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- '**.ts'
jobs:
publish-gpr:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.6.0
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: yarn install
- run: sed -i '3s/\([0-9]\{1,3\}\.[0-9]\{1,3\}\)\.[0-9]\{1,3\}/\1.${{ github.run_number }}/g' package.json
- run: npm run build
- run: npm publish
- name: GH Release
uses: softprops/action-gh-release@v0.1.15
with:
tag_name: ${{ env.APPVERSION }}
target_commitish: ${{ github.sha }}
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"dev": "nodemon cmd/bot.ts",
"build": "tsc"
},
"files": [
"libs/*",
"*.md"
],
"repository": {
"type": "git",
"url": "git+https://github.com/erictik/Midjourney-Wrapper.git"
Expand All @@ -19,7 +23,7 @@
"wrapper",
"discord"
],
"author": "",
"author": "Eric Yang <yanghao@10d.xin>",
"license": "ISC",
"bugs": {
"url": "https://github.com/erictik/Midjourney-Wrapper/issues"
Expand All @@ -28,11 +32,11 @@
"devDependencies": {
"nodemon": "^2.0.22",
"ts-node": "^10.9.1",
"dotenv": "^16.0.3",
"typescript": "^5.0.4"
},
"dependencies": {
"discord.js": "^14.9.0",
"dotenv": "^16.0.3",
"midjourney": "^1.0.8"
}
}

0 comments on commit 5d375dd

Please sign in to comment.