diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index a89f666..a4a4238 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -7,8 +7,9 @@ runs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: '20' node-version-file: .nvmrc + npm-version: '12.10.0' - name: Install dependencies run: yarn install --immutable diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 88a4d5a..3453bf3 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -1,27 +1,29 @@ name: Publish new release + on: pull_request: types: [closed] branches: - - 'master' + - "master" push: tags: - - 'v*' + - "v*" + +permissions: + contents: read + id-token: write jobs: release_gh: - name: Create new GitHub release + name: Create new GitHub release if: contains(github.event.pull_request.labels.*.name, 'release') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '20.x' - registry-url: 'https://registry.npmjs.org' + - name: Setup + uses: ./.github/actions/setup - name: git config run: | @@ -48,40 +50,13 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '20.x' - registry-url: 'https://registry.npmjs.org' - node-version-file: .nvmrc - - - name: Cache dependencies - id: yarn-cache - uses: actions/cache@v4 - with: - path: | - **/node_modules - .yarn/install-state.gz - key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }} - restore-keys: | - ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - ${{ runner.os }}-yarn- - - - name: Install dependencies - if: steps.yarn-cache.outputs.cache-hit != 'true' - run: yarn install --immutable - shell: bash - - - name: Build Expo plugin - run: yarn build:plugin - shell: bash + - name: Setup + uses: ./.github/actions/setup - name: Configure git run: | git config user.name "${GITHUB_ACTOR}" git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" - - - name: Publish package + + - name: Publish package run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 39968cb..5986b30 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "bugs": { "url": "https://github.com/talsec/Free-RASP-ReactNative/issues" }, - "homepage": "https://github.com/talsec/Free-RASP-ReactNative#readme", + "homepage": "https://docs.talsec.app/freerasp", "publishConfig": { "registry": "https://registry.npmjs.org/" },