From 579672ea3f807b85451bbe90711b8e86747acfa7 Mon Sep 17 00:00:00 2001 From: "Chung, Lian" <18393696+hikariNTU@users.noreply.github.com> Date: Wed, 1 Jun 2022 11:40:34 +0800 Subject: [PATCH] 0.1.4 --- .github/workflows/main.yml | 71 ----------------------------------- .github/workflows/publish.yml | 38 +++++++++++++++++++ package.json | 2 +- 3 files changed, 39 insertions(+), 72 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 48677f2..6e97255 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,12 +12,6 @@ on: - next workflow_dispatch: - inputs: - force-publish: - description: trigger publish pipeline manually - type: boolean - required: false - default: false jobs: test: @@ -39,68 +33,3 @@ jobs: - name: Test run: pnpm test run - - build: - if: github.ref_name == 'main' - needs: test - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Check version changes - uses: EndBug/version-check@v2 - id: check - with: - file-name: ./packages/contrast/package.json - - - name: Install pnpm - if: steps.check.outputs.changed == 'true' - uses: pnpm/action-setup@v2 - - - name: Set node - if: steps.check.outputs.changed == 'true' - uses: actions/setup-node@v3 - with: - node-version: 16.x - cache: pnpm - - - name: Install - if: steps.check.outputs.changed == 'true' - run: pnpm install - - - name: Build - if: steps.check.outputs.changed == 'true' - run: pnpm --filter wcag-contrast-util run build - - - name: Publish - if: steps.check.outputs.changed == 'true' - run: pnpm --filter wcag-contrast-util publish - env: - NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} - - check-npm: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Check version changes - uses: EndBug/version-check@v2 - id: check - with: - file-name: ./packages/contrast/package.json - - - name: Install pnpm - uses: pnpm/action-setup@v2 - - - name: Set node - uses: actions/setup-node@v3 - with: - node-version: 16.x - cache: pnpm - - - name: Check - run: npm whoami - env: - NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..a500067 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,38 @@ +name: Publish Package + +on: + push: + tags: + - v* + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Install pnpm + uses: pnpm/action-setup@v2 + + - name: Set node + uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: pnpm + + - name: Install + run: pnpm install + + - name: Build + run: pnpm --filter wcag-contrast-util run build + + - run: npx conventional-github-releaser -p angular + env: + CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Publish + run: pnpm --filter wcag-contrast-util publish + env: + NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/package.json b/package.json index 113ffba..35efc0e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "wcag-contrast", "private": "true", - "version": "1.0.0", + "version": "0.1.4", "description": "WCAG contrast criterion", "keywords": [ "WCAG",