ci: update actions

This commit is contained in:
2023-11-20 02:39:48 +02:00
committed by Chen Asraf
parent 09fc7b65bb
commit 214f808d54
2 changed files with 15 additions and 13 deletions

View File

@@ -2,7 +2,7 @@ name: Releases
on:
push:
branches: [master, develop]
branches: [ master, develop ]
jobs:
build:
runs-on: ubuntu-latest
@@ -11,23 +11,24 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- run: yarn install --frozen-lockfile
- run: yarn test
- run: yarn build
node-version: '18.x'
- run: npm i -g pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test
- run: pnpm build
- run: yarn pack --filename=release.tgz
- name: Publish on NPM
if: "!contains(github.event.head_commit.message, '[skip publish]')"
uses: JS-DevTools/npm-publish@v1
with:
package: build/package.json
token: "${{ secrets.NPM_TOKEN }}"
token: '${{ secrets.NPM_TOKEN }}'
- uses: Klemensas/action-autotag@stable
if: "!contains(github.event.head_commit.message, '[skip publish]')"
id: update_tag
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
tag_prefix: "v"
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
tag_prefix: 'v'
- name: Create Release
if: "!contains(github.event.head_commit.message, '[skip publish]') && steps.update_tag.outputs.tagname"
uses: actions/create-release@v1

View File

@@ -2,7 +2,7 @@ name: Pull Requests
on:
pull_request:
branches: [master, develop]
branches: [ master, develop ]
jobs:
build:
runs-on: ubuntu-latest
@@ -11,7 +11,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- run: yarn install --frozen-lockfile
- run: yarn test
- run: yarn build
node-version: '18.x'
- run: npm i -g pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm test
- run: pnpm build