From 7b4e0b73d4b182156efc3dea7debbc3fcb20b093 Mon Sep 17 00:00:00 2001 From: "Mountain/\\Ash" Date: Fri, 12 Apr 2024 16:49:30 +0200 Subject: [PATCH] :construction_worker: GHActions workflows updated to use cache built into the Node setup step --- .github/workflows/debug-action.yml | 2 +- .github/workflows/latest-tag.yml | 10 +++++-- .github/workflows/node.yml | 21 ++++++++----- .github/workflows/release.yml | 47 ------------------------------ CHANGELOG.md | 2 +- 5 files changed, 22 insertions(+), 60 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/debug-action.yml b/.github/workflows/debug-action.yml index 4b857e2a..cf6358ca 100644 --- a/.github/workflows/debug-action.yml +++ b/.github/workflows/debug-action.yml @@ -58,7 +58,7 @@ jobs: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} ALIAS_DOMAINS: | - {BRANCH}.vercel.app + {REPO}-{BRANCH}.vercel.app {USER}-{REPO}-{SHA}.vercel.app RUNTIME_ENV: | LATEST_SHA=${{ github.sha }} diff --git a/.github/workflows/latest-tag.yml b/.github/workflows/latest-tag.yml index 0c29c374..302ae5f0 100644 --- a/.github/workflows/latest-tag.yml +++ b/.github/workflows/latest-tag.yml @@ -1,15 +1,19 @@ name: Tag CI + on: release: - types: [published, edited] + types: + - published + - edited + jobs: latest: name: Latest - runs-on: windows-latest + runs-on: ubuntu-latest steps: - name: Update latest tag uses: Actions-R-Us/actions-tagger@latest env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: publish_latest_tag: true \ No newline at end of file diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 21b8b66d..dc7fc738 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -1,11 +1,9 @@ name: Node CI + on: push: - branches-ignore: - - main pull_request: - branches-ignore: - - main + jobs: lint: name: Lint @@ -13,25 +11,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node.js uses: actions/setup-node@v4 - - name: Cache node modules - uses: c-hive/gha-npm-cache@v1 + with: + cache: 'npm' + - name: Install dependencies run: npm ci + - name: Run lint command run: npm run lint + build: name: Build runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node.js uses: actions/setup-node@v4 - - name: Cache node modules - uses: c-hive/gha-npm-cache@v1 + with: + cache: 'npm' + - name: Install dependencies run: npm ci + - name: Run build command run: npm run build \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index b4d5d1bc..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Release CI -on: - push: - branches: - - main - workflow_dispatch: -jobs: - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20.2 - cache: npm - - name: Install dependencies - run: npm ci - - name: Run lint command - run: npm run lint - release: - needs: [lint] - name: Build and release - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20.2 - cache: npm - - name: Install dependencies - run: npm ci - - name: Run build command - run: npm run build - - name: Release - run: npx semantic-release - env: - GITHUB_TOKEN: ${{ secrets.GH_PAT }} - GIT_AUTHOR_NAME: "Release Bot" - GIT_AUTHOR_EMAIL: "bot@mxis.ch" - GIT_COMMITTER_NAME: "Release Bot" - GIT_COMMITTER_EMAIL: "bot@mxis.ch" - COMMIT_ASSETS: dist diff --git a/CHANGELOG.md b/CHANGELOG.md index fa614143..9caaf60b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ - Updated to eslint v9 - Removed dependency on remote eslint config - Docs: `secrets.GH_PAT` replaced with `secrets.GITHUB_TOKEN` - +- GHActions workflows updated to use cache built into the Node setup step ## [v2.2.6] - 2024-04-12