Release @latest #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release @latest | |
env: | |
YARN_IGNORE_NODE: 1 | |
RETRY_TESTS: 1 | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
name: "Release" | |
if: (!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, 'docs:')) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} | |
fetch-depth: 0 | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Enable corepack | |
run: | | |
corepack enable | |
corepack prepare yarn@stable --activate | |
- name: Activate cache for Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'yarn' | |
- name: Install Dependencies | |
run: yarn | |
- name: Build | |
run: yarn build:deploy | |
- name: Setup git user and npm | |
run: | | |
git config --global user.name "Apify Release Bot" | |
git config --global user.email "[email protected]" | |
echo "access=public" > ~/.npmrc | |
echo "//registry.npmjs.org/:_authToken=${{ secrets.APIFY_SERVICE_ACCOUNT_NPM_TOKEN }}" >> ~/.npmrc | |
- name: Publish to npm | |
run: | | |
cd ./packages/plugin | |
npm publish --access public | |
env: | |
NPM_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_NPM_TOKEN }} | |
GIT_USER: '[email protected]:${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}' | |
GH_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }} |