fix: version #89
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 | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
actions: read | |
steps: | |
- uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ vars.VERSION_BUMPER_APPID }} | |
private-key: ${{ secrets.VERSION_BUMPER_SECRET }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.app-token.outputs.token }} | |
- name: Set up Git user | |
run: | | |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git config --global user.name "${GITHUB_ACTOR}" | |
- name: Install Dependencies with Frozen Lockfile | |
run: | | |
yarn install --frozen-lockfile | |
- name: Reinstall Dependencies for Specific Projects | |
env: | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
run: | | |
npx nx run-many --target=reinstall --projects=justaname-express,justaname-next-app,justaname-next-pages,justaname-fastify,justaname-nestjs,justaname-expo-full,justaname-react,justaname-hapi,justaname-koa,justaname-expo-frontend --parallel | |
- name: Check for Updated yarn.lock Files | |
run: | | |
git add examples/*/yarn.lock | |
git diff --cached --exit-code || (git commit -m "CI: Update yarn.lock files" && git push origin main) | |
- name: Build and Test | |
run: | | |
npx nx affected -t lint | |
npx nx affected -t test --configuration=ci --passWithNoTests --exclude=justaname-mono-sdk | |
npx nx affected -t build | |
- name: Pull latest changes from main | |
run: git pull origin main | |
- name: Release | |
run: npx nx release --type=patch --yes | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |