diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11bc764..8e2e6d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file is automatically managed by . +# This file is automatically managed by . # Any manual changes to this file may be overwritten. name: CI @@ -19,9 +19,9 @@ jobs: with: fetch-depth: 0 - name: Setup pnpm - uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2 # v2.0.1 + uses: pnpm/action-setup@10693b3829bf86eb2572aef5f3571dcf5ca9287d # v2.2.2 with: - version: 6.26.0 + version: 7.13.1 - name: Setup Node.js uses: actions/setup-node@v2 with: @@ -46,9 +46,9 @@ jobs: with: fetch-depth: 0 - name: Setup pnpm - uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2 # v2.0.1 + uses: pnpm/action-setup@10693b3829bf86eb2572aef5f3571dcf5ca9287d # v2.2.2 with: - version: 6.26.0 + version: 7.13.1 - name: Setup Node.js uses: actions/setup-node@v2 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e56074a..a8a9f4e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,13 +1,14 @@ -# This file is automatically managed by . +# This file is automatically managed by . # Any manual changes to this file may be overwritten. name: Publish on: push: - tags: - - '*' + branches: + - main +concurrency: ${{ github.workflow }}-${{ github.ref }} jobs: - test: + release: name: Release runs-on: ubuntu-20.04 steps: @@ -16,9 +17,9 @@ jobs: with: fetch-depth: 0 - name: Setup pnpm - uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2 # v2.0.1 + uses: pnpm/action-setup@10693b3829bf86eb2572aef5f3571dcf5ca9287d # v2.2.2 with: - version: 6.26.0 + version: 7.13.1 - name: Setup Node.js uses: actions/setup-node@v2 with: @@ -26,19 +27,11 @@ jobs: cache: pnpm - name: Install dependencies and build run: pnpm install --prefer-offline - - name: Get tag for npm publish - id: get-tag - run: | - if [ -f .changeset/pre.json ]; then - TAG=$(jq -r '.tag' .changeset/pre.json) - else - TAG=latest - fi - echo "$TAG" - echo "::set-output name=tag::$TAG" - - name: Publish to npm - uses: JS-DevTools/npm-publish@v1 + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: changesets/action@2a025e8ab1cfa4312c2868cb6aa3cd3b473b84bf # v1.3.0 with: - token: ${{ secrets.NPM_TOKEN }} - access: public - tag: ${{ steps.get-tag.outputs.tag }} + publish: pnpm run release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 72e333a..2aecf62 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# This file is automatically managed by . +# Any manual changes to this file may be overwritten. + /lib/ /lib-commonjs/ /dist/ diff --git a/.prettierignore b/.prettierignore index 03181aa..7040584 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,6 @@ +# This file is automatically managed by . +# Any manual changes to this file may be overwritten. + /dist/ /etc/ /lib/ diff --git a/.prettierrc.yml b/.prettierrc.yml index 04d4e49..6595bd5 100644 --- a/.prettierrc.yml +++ b/.prettierrc.yml @@ -1,4 +1,4 @@ -# This file is automatically managed by . +# This file is automatically managed by . # Any manual changes to this file may be overwritten. singleQuote: true diff --git a/config/api-extractor.json b/config/api-extractor.json index d396f82..9ea4699 100644 --- a/config/api-extractor.json +++ b/config/api-extractor.json @@ -1,4 +1,4 @@ -// This file is automatically managed by . +// This file is automatically managed by . // Any manual changes to this file may be overwritten. /** diff --git a/config/rig.json b/config/rig.json index 7d83996..ebedd13 100644 --- a/config/rig.json +++ b/config/rig.json @@ -1,4 +1,4 @@ -// This file is automatically managed by . +// This file is automatically managed by . // Any manual changes to this file may be overwritten. { diff --git a/etc/README.md b/etc/README.md new file mode 100644 index 0000000..4609d52 --- /dev/null +++ b/etc/README.md @@ -0,0 +1,6 @@ + + +This directory contains a report file generated by [API Extractor](https://api-extractor.com/). diff --git a/package.json b/package.json index b9efab1..2f289e9 100644 --- a/package.json +++ b/package.json @@ -22,11 +22,11 @@ "author": "Thai Pangsakulyanont (http://dt.in.th/)", "license": "MIT", "devDependencies": { - "@changesets/cli": "2.20.0", - "@rushstack/heft": "0.44.2", - "@rushstack/heft-web-rig": "0.8.2", - "@types/heft-jest": "1.0.2", - "prettier": "2.5.1" + "@changesets/cli": "2.25.0", + "@rushstack/heft": "0.45.12", + "@rushstack/heft-web-rig": "0.10.15", + "@types/heft-jest": "1.0.3", + "prettier": "2.7.1" }, "dependencies": { "@types/gapi": "^0.0.41", @@ -42,4 +42,4 @@ "bugs": { "url": "https://github.com/dtinth/google-sign-in-controller#issues" } -} +} \ No newline at end of file diff --git a/scripts/generate-api-docs b/scripts/generate-api-docs index 102df58..aca6302 100755 --- a/scripts/generate-api-docs +++ b/scripts/generate-api-docs @@ -1,6 +1,6 @@ #!/bin/bash -e -# This file is automatically managed by . +# This file is automatically managed by . # Any manual changes to this file may be overwritten. for I in temp/api/*.json; do diff --git a/scripts/release b/scripts/release index bfa1bcf..fe8a71e 100755 --- a/scripts/release +++ b/scripts/release @@ -1,13 +1,6 @@ #!/bin/bash -e -# This file is automatically managed by . +# This file is automatically managed by . # Any manual changes to this file may be overwritten. -changeset status -changeset version -version=$(jq -r '.version' package.json) -echo "Version to release: $version" -git add --update -git commit -am "v$version" -git tag -a "v$version" -m "v$version" -echo "Committed and tagged. Run 'git push --follow-tags' to push to remote." \ No newline at end of file +changeset publish diff --git a/tsconfig-base.json b/tsconfig-base.json index d810c12..69dd327 100644 --- a/tsconfig-base.json +++ b/tsconfig-base.json @@ -1,4 +1,4 @@ -// This file is automatically managed by . +// This file is automatically managed by . // Any manual changes to this file may be overwritten. {