Skip to content

release

release #106

Workflow file for this run

name: Custom Release
on:
workflow_dispatch:
repository_dispatch:
types: [release]
env:
NODE_OPTIONS: --max_old_space_size=4096
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
jobs:
npm-release:
name: NPM release ("${{ github.event.client_payload.tag }}" tag)
runs-on: webiny-build-packages
environment: release
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.branch }}
fetch-depth: 0
- name: Install dependencies
run: yarn --immutable
- name: Build packages
run: yarn build
- name: Create ".npmrc" file in the project root
run: echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
- name: Set git email
run: git config --global user.email "[email protected]"
- name: Set git username
run: git config --global user.name "webiny-bot"
- name: Version and Publish
run: >
yarn release
--type=${{ github.event.client_payload.type }}
--tag=${{ github.event.client_payload.tag }}
--version=${{ github.event.client_payload.version }}
--createGithubRelease=${{ github.event.client_payload.createGithubRelease }}