Skip to content

@reapit/elements_v5.0.0-beta.17 #17

@reapit/elements_v5.0.0-beta.17

@reapit/elements_v5.0.0-beta.17 #17

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/get-tag@v2.1
id: tagName
with:
tagRegex: '(?<package>.*)_(?<version>.*)'
- name: Set Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Set Version
run: |
echo "RELEASE_VERSION=${{ steps.tagName.outputs.package }}_${{ steps.tagName.outputs.version }}" >> $GITHUB_ENV
- name: Install
run: yarn
- name: Lint
run: |
yarn lint
- name: TypeCheck
run: |
yarn check
- name: Test
run: |
yarn test --watch=false --ci --forceExit --detectOpenHandles --runInBand --passWithNoTests
- name: Package Version Bump
run: |
yarn version ${{ steps.tagName.outputs.version }}
- name: Build Lib
run: |
yarn build:dist
- name: Build Storybook
run: |
yarn build:storybook
- 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