-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (51 loc) · 1.42 KB
/
Prerelease.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
name: Prerelease
on:
push:
branches:
- dev
paths:
- XMOJ.user.js
workflow_dispatch:
jobs:
Prerelease:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Generate a token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Publish to npm
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- name: Get version
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
id: get_version
run: node ./Update/GetVersion.js
- id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
with:
tag_name: ${{ steps.get_version.outputs.version }}
generate_release_notes: true
draft: false
prerelease: true
files: XMOJ.user.js
target_commitish: ${{ github.sha }}
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: .
- uses: actions/deploy-pages@v4