From 8c37efa741550e62e872165a7f1deb0dcd09440e Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 14 Nov 2023 14:08:29 +0300 Subject: [PATCH] Update actions workflow --- .github/workflows/pr-build-check.yaml | 2 - .github/workflows/pr-code-check.yaml | 1 - .../push-main-generate-artifacts.yaml | 64 +++++++++++++++++++ 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/push-main-generate-artifacts.yaml diff --git a/.github/workflows/pr-build-check.yaml b/.github/workflows/pr-build-check.yaml index 8df3447..2c80118 100644 --- a/.github/workflows/pr-build-check.yaml +++ b/.github/workflows/pr-build-check.yaml @@ -8,8 +8,6 @@ on: jobs: build: runs-on: ubuntu-latest - env: - ACTIONS_RUNNER_DEBUG: true steps: - name: Install Node.js uses: actions/setup-node@v4 diff --git a/.github/workflows/pr-code-check.yaml b/.github/workflows/pr-code-check.yaml index 53b6acb..17ce929 100644 --- a/.github/workflows/pr-code-check.yaml +++ b/.github/workflows/pr-code-check.yaml @@ -8,7 +8,6 @@ on: jobs: build: runs-on: ubuntu-latest - steps: - name: Install Node.js uses: actions/setup-node@v4 diff --git a/.github/workflows/push-main-generate-artifacts.yaml b/.github/workflows/push-main-generate-artifacts.yaml new file mode 100644 index 0000000..ac7c255 --- /dev/null +++ b/.github/workflows/push-main-generate-artifacts.yaml @@ -0,0 +1,64 @@ +name: Build project check + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: "16" + + - name: Checkout war3js_unsafe repository + uses: actions/checkout@v4 + with: + repository: kirill-782/war3js_unsafe + path: unsafe + + - name: Install unsafe dependencies + run: npm install + working-directory: ./unsafe + + - name: Build unsafe + run: npm run build + working-directory: ./unsafe + + - name: Checkout current repository + uses: actions/checkout@v4 + with: + path: bootstrap + + - name: Install dependencies + run: npm install + working-directory: ./bootstrap + + - name: Bundle js file + run: npm run bundle + working-directory: ./bootstrap + + - name: Bundle types + run: npm run typesgen + working-directory: ./bootstrap + + - name: Upload bootstrap.js + uses: actions/upload-artifact@v3 + with: + name: bootstrap.js + path: ./bootstrap/build/esbuild/bootstrap.js + + - name: Upload natives.d.ts + uses: actions/upload-artifact@v3 + with: + name: natives.js + path: ./bootstrap/build/fullTypes/natives.d.ts + + - name: Upload bootstrap.d.ts + uses: actions/upload-artifact@v3 + with: + name: bootstrap.d.ts + path: ./bootstrap/build/fullTypes/bootstrap.d.ts