-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'smogon:master' into modjoin
- Loading branch information
Showing
539 changed files
with
346,455 additions
and
85,862 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Publish to npm | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- 'package.json' | ||
jobs: | ||
test: | ||
uses: ./.github/workflows/test.yml | ||
get-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
current_version: ${{ steps.current_version.outputs.version }} | ||
last_version: ${{ steps.last_version.outputs.version }} | ||
token_exists: ${{ steps.check_token.outputs.token }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 50 | ||
# Check if the package.json version field has changed since the last push | ||
- name: Get current version from package.json | ||
id: current_version | ||
run: | | ||
echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT | ||
- name: Get the version from the last push | ||
id: last_version | ||
run: | | ||
git checkout ${{ github.event.before }} | ||
echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT | ||
- name: Check if NPM_TOKEN exists | ||
id: check_token | ||
run: | | ||
echo "token=$(if [ -n "${{ secrets.NPM_TOKEN }}" ]; then echo true; else echo false; fi)" >> $GITHUB_OUTPUT | ||
npm-publish: | ||
needs: | ||
- test | ||
- get-version | ||
runs-on: ubuntu-latest | ||
# We only want to publish if the package.json version field has changed | ||
if: needs.get-version.outputs.current_version != needs.get-version.outputs.last_version && needs.get-version.outputs.token_exists == 'true' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'npm' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Update the npm package version | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
required: true | ||
type: choice | ||
description: Version type | ||
default: patch | ||
options: | ||
- major | ||
- minor | ||
- patch | ||
- premajor | ||
- preminor | ||
- prepatch | ||
- prerelease | ||
jobs: | ||
update_version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'npm' | ||
- id: bump_version | ||
run: | | ||
echo "old_version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT | ||
npm version ${{ github.event.inputs.version }} --no-git-tag-version | ||
echo "new_version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT | ||
- uses: peter-evans/create-pull-request@v4 | ||
with: | ||
title: Bump package.json version to v${{ steps.bump_version.outputs.new_version }}} | ||
body: | | ||
Bump package.json version from `v${{ steps.bump_version.outputs.old_version }}` to `v${{ steps.bump_version.outputs.new_version }}` | ||
commit-message: Bump package.json version to v${{ steps.bump_version.outputs.new_version }} | ||
branch: npm-version-bump | ||
base: master | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/config/* | ||
!/config/formats.ts | ||
/logs/* | ||
/logs/**/* | ||
/test/modlogs | ||
/test/replays/*.html | ||
/node_modules | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
/config/* | ||
!/config/formats.ts | ||
!/config/config-example.js | ||
/logs/* | ||
/test/modlogs | ||
/node_modules | ||
|
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
Validating CODEOWNERS rules …
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
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
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
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
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
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
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
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
Oops, something went wrong.