From c0d46689941f45a14fb957c833e984c2ee5e51b0 Mon Sep 17 00:00:00 2001 From: Maximilian Bala Date: Tue, 22 Feb 2022 23:33:11 +0000 Subject: [PATCH] add new types + auto release --- .github/workflows/release.yml | 36 +++++++++++++++++++++++++++++++++++ package-lock.json | 2 +- package.json | 8 ++++---- plugin.ts | 2 +- tsconfig.json | 7 +++---- 5 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..77c1dcd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release + +# Run on every commit tag which begins with "v" (e.g., "v0.1.4") +on: + push: + tags: + - "v*" + +# Automatically create a GitHub Release, with release details specified (the relevant commits) +jobs: + release: + name: "Release" + runs-on: "ubuntu-latest" + steps: + + - uses: actions/checkout@v2 + + - name: Setup NodeJS + uses: actions/setup-node@v1 + with: + node-version: '16' + + - name: Build + run: | + npm ci + npm run build + + - name: Create Zip + run: zip -r module-valorant-pregame.zip package.json package-lock.json dist/* frontend/* + + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + files: | + module-valorant-pregame.zip \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d5141aa..9d8aa21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "league-prod-toolkit": "file:../..", + "rcv-prod-toolkit-types": "^1.0.1", "sass": "^1.34.1", "typescript": "^4.3.2" } diff --git a/package.json b/package.json index 5b1bdc0..c2e907a 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "name": "valorant-pregame", + "name": "module-valorant-pregame", "version": "1.0.0", "description": "Module that provides a gfx for the Valorant PreGame", - "author": "Himyu", + "author": "RCVolus", "license": "MIT", "toolkit": { "modes": [ @@ -13,9 +13,9 @@ }, "needsBuild": true }, - "dependencies": { + "devDependencies": { "typescript": "^4.3.2", - "league-prod-toolkit": "file:../..", + "rcv-prod-toolkit-types": "^1.0.1", "sass": "^1.34.1" }, "scripts": { diff --git a/plugin.ts b/plugin.ts index a65aaa1..c46f871 100644 --- a/plugin.ts +++ b/plugin.ts @@ -1,4 +1,4 @@ -import { PluginContext } from 'league-prod-toolkit/core/modules/Module' +import type { PluginContext } from 'rcv-prod-toolkit-types' module.exports = async (ctx: PluginContext) => { // Register new UI page diff --git a/tsconfig.json b/tsconfig.json index 0f2b1e5..c40203e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,10 +7,9 @@ "allowJs": true, "outDir": "./dist", "rootDir": "./", - "tsBuildInfoFile": "dist/.tsbuildinfo", "strict": true, "resolveJsonModule": true, "esModuleInterop": true - } -} - \ No newline at end of file + }, + "exclude": ["frontend", "dist"] +} \ No newline at end of file