Skip to content

Merge pull request #375 from XMOJ-Script-dev/boomzero/spellcheck #85

Merge pull request #375 from XMOJ-Script-dev/boomzero/spellcheck

Merge pull request #375 from XMOJ-Script-dev/boomzero/spellcheck #85

Workflow file for this run

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@v1
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@v4
- uses: actions/upload-pages-artifact@v3
with:
path: .
- uses: actions/deploy-pages@v4