Skip to content

feat: update useUat flag to environment (#36) #5

feat: update useUat flag to environment (#36)

feat: update useUat flag to environment (#36) #5

Workflow file for this run

name: Deploy Bundle to Dev
on:
push:
branches: [master]
jobs:
build-release:
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
actions: read
environment: DEV
strategy:
matrix:
node: ["20.x"]
os: [ubuntu-latest]
env:
CI: 1
HUSKY: 0 # disables husky hooks
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_SEMANTIC_RELEASE_PAT }}
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
# registry-url not needed - no npm publishing in dev workflow
- name: Install Deps (with cache)
uses: bahmutov/npm-install@v1
with:
install-command: yarn --immutable --no-progress --ignore-scripts
- name: Get New Version
id: get-new-version
uses: mathieudutour/github-tag-action@v5.2
with:
dry_run: true
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Bump Version
run: make update-version NEW_VERSION=${{ steps.get-new-version.outputs.new_version }}
- name: Build
run: make build
env:
SKIP_INSTALL: 1 # install with cache was done already
create-pre-release:
runs-on: ubuntu-latest
needs:
- build-release
strategy:
matrix:
node: ["20.x"]
steps:
- name: Version and Tag
id: version-and-tag
uses: mathieudutour/github-tag-action@v5.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Release Notes
id: release-notes
uses: actions/github-script@v6
env:
NEW_RELEASE_TAG: ${{ steps.version-and-tag.outputs.new_tag }}
with:
result-encoding: string
script: |
const { NEW_RELEASE_TAG } = process.env;
const latestRelease = await github.rest.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo,
});
const releaseNotes = await github.rest.repos.generateReleaseNotes({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: NEW_RELEASE_TAG,
previous_tag_name: latestRelease.data.tag_name,
});
return releaseNotes.data.body;
- name: Create Pre-Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
generate_release_notes: false
body: ${{ steps.release-notes.outputs.result }}
tag_name: ${{ steps.version-and-tag.outputs.new_tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Stop Deploy Message
if: always()
uses: Basis-Theory/github-actions/deploy-slack-action@master
with:
slack-api-token: ${{ secrets.SLACK_DUCKBOT_API_KEY }}
channel: ${{ vars.SLACK_DUCKBOT_DEV_DEPLOY_CHANNEL_ID }}
status: "done"