diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 39bccc9d6..a73ffb3d9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,18 +2,18 @@ name: Publish on: push: - tags: - - '*' + branches: + - master jobs: build: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: '14.x' + node-version: '20.x' registry-url: 'https://npm.pkg.github.com' - name: Build reencode action run: cd ./.github/actions/reencode-dictionaries && npm install && cd ../../../ @@ -22,6 +22,6 @@ jobs: - name: "Change dictionaries encoding to UTF-8" uses: ./.github/actions/reencode-dictionaries - name: Publish - run: npm publish + run: ./release.sh env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml deleted file mode 100644 index 4204f0029..000000000 --- a/.github/workflows/tag.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Tag - -on: - push: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - # Use PAT instead of default Github token, because the default - # token deliberately will not trigger another workflow run - token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - - name: Tag - run: ./tag.sh diff --git a/tag.sh b/release.sh similarity index 96% rename from tag.sh rename to release.sh index 3f55ed2c6..c4ee420ec 100755 --- a/tag.sh +++ b/release.sh @@ -17,3 +17,5 @@ fi git tag $VERSION git push origin refs/tags/$VERSION + +npm publish