forked from PaladinsDev/paladins.js
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (54 loc) 路 1.55 KB
/
production-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Production Test & Deploy
on:
push:
branches:
- main
env:
PALADINS_DEV_ID: ${{ secrets.PALADINS_DEV_ID }}
PALADINS_API_KEY: ${{ secrets.PALADINS_API_KEY }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
test:
name: "test 馃И"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Build docker image
run: npm run test
deploy:
name: "deploy 馃殌"
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Publish package to npm
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ env.NPM_TOKEN }}
create-release:
needs: deploy
name: "create release 馃摝"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get version from package.json
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
with:
custom_tag: ${{ steps.package-version.outputs.current-version}}
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
bodyFile: CHANGELOG.md