feat: remove margins (#341) #146
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
on: | |
push: | |
branches: | |
- main | |
name: Release Please | |
jobs: | |
release-please: | |
environment: "prod" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to create release commit (googleapis/release-please-action) | |
pull-requests: write # to create release PR (googleapis/release-please-action) | |
outputs: | |
storybook_html_released: ${{ steps.publish-outputs.outputs.storybook_html_released }} | |
storybook_react_released: ${{ steps.publish-outputs.outputs.storybook_react_released }} | |
docs_released: ${{ steps.publish-outputs.outputs.docs_released }} | |
steps: | |
- uses: googleapis/release-please-action@v4 | |
id: release | |
with: | |
token: ${{ secrets.REPO_PAT }} | |
config-file: release-please-config.json | |
manifest-file: .release-please-manifest.json | |
- name: Checkout code | |
if: ${{ steps.release.outputs['packages/html/ds--release_created'] || steps.release.outputs['packages/react/ds--release_created'] || steps.release.outputs['packages/themes/govie--release_created'] || steps.release.outputs['tokens--release_created'] }} | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.REPO_PAT }} | |
- name: Use Node.js | |
if: ${{ steps.release.outputs['packages/html/ds--release_created'] || steps.release.outputs['packages/react/ds--release_created'] || steps.release.outputs['packages/themes/govie--release_created'] || steps.release.outputs['tokens--release_created'] }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Build | |
if: ${{ steps.release.outputs['packages/html/ds--release_created'] || steps.release.outputs['packages/react/ds--release_created'] || steps.release.outputs['packages/themes/govie--release_created'] || steps.release.outputs['tokens--release_created'] }} | |
run: | | |
corepack enable | |
pnpm install --frozen-lockfile --ignore-scripts | |
pnpm build | |
- name: Publish DS React package | |
if: ${{ steps.release.outputs['packages/react/ds--release_created'] }} | |
run: | | |
pnpm --filter "@govie-ds/react" publish | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish Theme GOV.IE design tokens package | |
if: ${{ steps.release.outputs['tokens--release_created'] }} | |
run: | | |
pnpm --filter "@govie-ds/tokens" publish | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish Tailwind Builder package | |
if: ${{ steps.release.outputs['packages/design/tailwind--release_created'] }} | |
run: | | |
pnpm --filter "@govie-ds/tailwind" publish | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish HTML output | |
if: ${{ steps.release.outputs['packages/html/ds--release_created'] }} | |
run: gh release upload ${{ steps.release.outputs['packages/html/ds--tag_name'] }} ./packages/html/ds/govie-frontend.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_PAT }} | |
- name: Publish Theme output | |
if: ${{ steps.release.outputs['packages/themes/govie--release_created'] }} | |
run: | | |
pnpm --filter "@govie-ds/theme-govie" publish | |
gh release upload ${{ steps.release.outputs['packages/themes/govie--tag_name'] }} ./packages/themes/govie/theme.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.REPO_PAT }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Tag Last Release | |
if: ${{ steps.release.outputs['packages/html/ds--release_created'] || steps.release.outputs['packages/react/ds--release_created'] || steps.release.outputs['packages/themes/govie--release_created'] || steps.release.outputs['tokens--release_created'] || steps.release.outputs['apps/docs--release_created'] }} | |
run: | | |
git tag -f last-release | |
git push origin last-release --force | |
git checkout latest-release | |
git rebase origin/main | |
git push origin --force | |
- name: Publish outputs | |
id: publish-outputs | |
run: | | |
echo "storybook_html_released=${{ steps.release.outputs['packages/html/ds--release_created'] }}" >> $GITHUB_OUTPUT | |
echo "storybook_react_released=${{ steps.release.outputs['packages/react/ds--release_created'] }}" >> $GITHUB_OUTPUT | |
echo "docs_released=${{ steps.release.outputs['apps/docs--release_created'] }}" >> $GITHUB_OUTPUT | |
deploy-docs-aws: | |
needs: release-please | |
if: ${{ needs.release-please.outputs.docs_released == 'true' }} | |
uses: ./.github/workflows/deploy-docs-aws.yml | |
with: | |
env: prod | |
secrets: | |
REPO_PAT: ${{ secrets.REPO_PAT }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |