Merge pull request #737 from XMOJ-Script-dev/boomzero/headers! #191
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |