From f4316dfb7b821478df12dce56ea6cbb20e8c965f Mon Sep 17 00:00:00 2001 From: William Killerud Date: Tue, 25 Jun 2024 13:52:12 +0200 Subject: [PATCH] chore: drop OS matrix, rename default branch We're not working with any OS specific stuff --- .github/workflows/publish.yml | 37 ++++++++++++----------------------- .github/workflows/test.yml | 34 ++++++++++++++++++-------------- release.config.cjs | 2 +- 3 files changed, 33 insertions(+), 40 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 489e56c..df58268 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,8 +2,8 @@ name: Release and Publish on: push: - branches: - - master + branches: + - main - alpha - beta - next @@ -14,37 +14,26 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 20.x + - name: npm install - run: | - npm install + run: npm install + - name: npm lint - run: | - npm run lint + run: npm run lint + + - name: npm types + run: npm run types + - name: npm test - run: | - npm test + run: npm test - release: - name: Release - runs-on: ubuntu-latest - needs: [test] - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20.x - - name: npm install - run: | - npm install - name: npx semantic-release - run: | - npx semantic-release + run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a82f29..6d71393 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,32 +1,36 @@ name: Run Lint and Tests -on: push +on: + pull_request: + branches: + - main + - alpha + - beta + - next jobs: build: runs-on: ubuntu-latest strategy: matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] - node-version: [lts/-2, lts/-1, lts/*] + node-version: [lts/-1, lts/*] + steps: - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + - name: npm install - run: | - npm install - env: - CI: true + run: npm install + - name: npm lint - run: | - npm run lint - env: - CI: true + run: npm run lint + + - name: npm types + run: npm run types + - name: npm test - run: | - npm test - env: - CI: true + run: npm test diff --git a/release.config.cjs b/release.config.cjs index f195d37..c6a260d 100644 --- a/release.config.cjs +++ b/release.config.cjs @@ -19,7 +19,7 @@ module.exports = { ], preset: 'angular', branches: [ - { name: 'master' }, + { name: 'main' }, { name: 'alpha', prerelease: true }, { name: 'beta', prerelease: true }, { name: 'next', prerelease: true },