mirror of
https://github.com/expo/eas-cli.git
synced 2026-11-15 17:31:46 -10:00
## Why - Repository maintenance: standardize on Yarn 4 managed via Mise. - Prepare for introducing minimum package-age constraints in dependency policy. ## How - Migrated repo tooling to Yarn 4 with Mise. - Updated CI and scripts for Yarn 4 behavior: - Lerna invoked via `yarn run -T lerna`. - Coverage args forwarded correctly (`-- --coverage`). - Removed unsupported Yarn 4 `--silent` usage. - Added missing package-local script dependencies surfaced by Yarn 4 (`jest`, `oxlint`, `rimraf`). - Increased `EasCommand` coverage test timeout from 30s to 60s. (Was consistently failing in CI.) ## Test Plan - CI only: `Run tests` matrix (including Node 20 coverage) and other touched workflows. - Release behavior will be verified during the normal release run.
104 lines
3.5 KiB
YAML
104 lines
3.5 KiB
YAML
on:
|
|
push:
|
|
tags:
|
|
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
|
|
name: Release workflow
|
|
|
|
jobs:
|
|
release:
|
|
name: Create a release
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
outputs:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
steps:
|
|
- id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: ${{ github.ref }}
|
|
draft: true
|
|
publish-to-npm:
|
|
name: Publish to npm
|
|
runs-on: ubuntu-latest
|
|
needs: release
|
|
permissions:
|
|
id-token: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup-mise
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
- name: Build
|
|
run: yarn build
|
|
- name: Publish packages to npm
|
|
run: yarn run -T lerna publish from-package --yes --no-verify-access
|
|
- name: Add latest-eas-build-staging tag
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
|
|
run: |
|
|
VERSION=$(cat lerna.json | jq -r .version)
|
|
echo //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN > ~/.npmrc
|
|
npm dist-tag add eas-cli@$VERSION latest-eas-build-staging
|
|
- name: Add latest-eas-build tag
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
|
|
run: |
|
|
VERSION=$(cat lerna.json | jq -r .version)
|
|
echo //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN > ~/.npmrc
|
|
npm dist-tag add eas-cli@$VERSION latest-eas-build
|
|
release-changelog:
|
|
name: Update changelog and publish release
|
|
runs-on: ubuntu-latest
|
|
needs: publish-to-npm
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.EXPO_BOT_PAT }}
|
|
- uses: ./.github/actions/setup-mise
|
|
- name: Install dependencies
|
|
working-directory: ./scripts
|
|
run: yarn install --immutable
|
|
- name: Resolve version
|
|
run: echo "EAS_CLI_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
|
- name: Update changelog
|
|
working-directory: ./scripts
|
|
run: yarn release-changelog $EAS_CLI_VERSION > /tmp/current-changelog
|
|
- name: Publish release
|
|
run: gh release edit v$EAS_CLI_VERSION --draft=false -F /tmp/current-changelog
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Commit and push
|
|
run: |
|
|
git fetch
|
|
git checkout main
|
|
git config --global user.email "[email protected]"
|
|
git config --global user.name "Expo CI"
|
|
git add CHANGELOG.md
|
|
git commit --allow-empty -m "update CHANGELOG.md"
|
|
git push
|
|
- name: Prepare changelog for Slack
|
|
run: |
|
|
tail -n +3 /tmp/current-changelog > /tmp/changelog.md
|
|
npx slackmd /tmp/changelog.md
|
|
echo 'SLACK_CHANGELOG<<EOF' >> $GITHUB_ENV
|
|
cat /tmp/changelog.slack.md >> $GITHUB_ENV
|
|
echo 'EOF' >> $GITHUB_ENV
|
|
- name: Slack Notification
|
|
uses: rtCamp/action-slack-notify@v2
|
|
env:
|
|
SLACK_CHANNEL: eas-cli
|
|
SLACK_COLOR: ${{ job.status }}
|
|
SLACK_ICON: https://github.com/expo-bot.png?size=48
|
|
SLACK_TITLE: "Released eas-cli@${{ env.EAS_CLI_VERSION }}"
|
|
SLACK_MESSAGE: ${{ env.SLACK_CHANGELOG }}
|
|
SLACK_USERNAME: "EAS CLI CI"
|
|
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
|
SLACK_FOOTER: ""
|