Prelease Prod #62
Workflow file for this run
This file contains hidden or 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: Prelease Prod | |
| on: | |
| release: | |
| types: [prereleased] | |
| env: | |
| NPM_TOKEN: ${{secrets.NPM_TOKEN}} | |
| CI: true | |
| IS_RELEASE: true | |
| APP_STAGE: 'production' | |
| permissions: | |
| contents: write | |
| id-token: write | |
| pull-requests: write | |
| jobs: | |
| prerelease-prod: | |
| name: Prerelease | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v3 | |
| with: | |
| role-to-assume: ${{ secrets.AWS_OIDC_ARN_PROD }} | |
| role-session-name: AWS_OIDC_ARN_PROD | |
| aws-region: ${{ secrets.AWS_REGION }} | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: main | |
| - name: Get Tag | |
| uses: olegtarasov/[email protected] | |
| id: tagName | |
| with: | |
| tagRegex: '(?<package>.*)_(?<version>.*)' | |
| - name: Set Node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22.x' | |
| - name: Set Version | |
| run: | | |
| echo "RELEASE_VERSION=${{ steps.tagName.outputs.package }}_${{ steps.tagName.outputs.version }}" >> $GITHUB_ENV | |
| - name: Install | |
| run: yarn install --immutable | |
| - name: Check | |
| run: | | |
| yarn check | |
| - name: Test | |
| run: | | |
| yarn test run --passWithNoTests | |
| - name: Package Version Bump | |
| run: | | |
| yarn version ${{ steps.tagName.outputs.version }} | |
| - name: Build | |
| run: | | |
| yarn build | |
| - name: Create Pull Request For Version | |
| uses: peter-evans/create-pull-request@v5 | |
| with: | |
| commit-message: 'chore: bump version to ${{ steps.tagName.outputs.version }}' | |
| title: 'chore: bump version to ${{ steps.tagName.outputs.version }}' | |
| body: Update to version in package.json | |
| base: main | |
| branch: chore/update-version-${{ steps.tagName.outputs.version }} | |
| - name: Deploy | |
| run: | | |
| yarn deploy | |
| - name: Set Publish Version | |
| run: | | |
| yarn version ${{ steps.tagName.outputs.version }} | |
| - name: Publish | |
| run: | | |
| yarn publish --tag beta |