Skip to content

release

release #84

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
npmTag:
type: choice
description: 'NPM tag to release'
options:
- latest
- next
required: true
default: "latest"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v4
with:
always-auth: true
node-version: 20
cache: 'yarn'
scope: '@lingui'
- name: Install dependencies if needed
run: yarn install
- name: Build packages
run: yarn release:build
- name: Unit Testing
run: yarn test:ci
- name: Linting & Types
run: yarn lint:all
- name: Integration Testing
run: yarn test:integration
- name: Creates local .npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Prepare Lingui-Bot git account
uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
name: 'Lingui Bot'
email: '[email protected]'
actor: 'lingui-bot'
token: '${{ secrets.GH_TOKEN }}'
- name: Versioning packages
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: yarn version:${{github.event.inputs.npmTag}}
- name: Packaging packages with newer version
run: yarn release:build
- name: Publishing packages
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: yarn release:${{github.event.inputs.npmTag}}