Skip to content
Merged
2 changes: 0 additions & 2 deletions .github/workflows/deploy-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Install jq
run: sudo apt-get install -y jq
- name: Find SPAs
id: find_spas
run: |
Expand Down
103 changes: 103 additions & 0 deletions .github/workflows/push-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Release on Push

on:
push:
branches:
- main

jobs:
release-please:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
environment: production
outputs:
spa_paths_released: ${{ steps.get-spa-paths.outputs.value }}
root_distribution: ${{ steps.get_env.outputs.root_distribution }}
root_bucket: ${{ steps.get_env.outputs.root_bucket }}
prs_created: ${{ steps.release-please.outputs.prs_created }}
steps:
- uses: googleapis/release-please-action@v4
name: Release Please
id: release-please
with:
token: ${{ secrets.GITHUB_TOKEN }}
include-component-in-tag: true
config-file: release-please-config.json
target-branch: ${{ github.ref_name }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Get SPA Paths
id: get-spa-paths
env:
RELEASES: "${{ toJson(steps.release-please.outputs.paths_released) }}"
# only include SPA paths that have been released (must end with "-spa")
run: |
SPA_PATHS=$(yarn workspaces list --json | jq -s -c --argjson releases "$RELEASES" '[.[] | select(.name | endswith("-spa")) | select(.location as $loc | $releases | index($loc) != null) | .location]')
echo "value=$SPA_PATHS" >> $GITHUB_OUTPUT
echo "SPA Paths: $SPA_PATHS"
- name: Get environment variables
id: get_env
run: |
echo "root_distribution=${{ vars.CLOUDFRONT_ROOT_DISTRIBUTION }}" >> $GITHUB_OUTPUT
echo "root_bucket=${{ vars.ROOT_AWS_BUCKET_NAME }}" >> $GITHUB_OUTPUT

update-pull-request:
if: ${{ needs.release-please.outputs.prs_created == 'true' }}
needs: release-please
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Fetching the repository
uses: actions/checkout@v2
with:
# release-please--branches-- plus the branch name
ref: release-please--branches--${{ github.ref_name }}
fetch-depth: 2
- name: Updating yarn.lock file
run: yarn install --mode=update-lockfile
- name: Merging changes with last commit
continue-on-error: true
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git reset --soft HEAD~1
git add .
git commit -am "chore: update lockfile"
- name: Push changes
uses: ad-m/github-push-action@master
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: release-please--branches--${{ github.ref_name }}
force: true

# matrix over modified SPAs to deploy
build-spas:
needs: release-please
if: ${{ needs.release-please.outputs.spa_paths_released != '[]' }}
uses: "./.github/workflows/template-publish-spas.yml"
with:
CDN_URL: ${{ vars.CDN_URL }}
CDN_BUCKET: ${{ vars.CDN_AWS_BUCKET_NAME }}
SPA_PATHS: ${{ needs.release-please.outputs.spa_paths_released }}
ALPHA_RELEASE: false
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_ACCESS_KEY_SECRET: ${{ secrets.AWS_ACCESS_KEY_SECRET }}

deploy-web:
needs: [build-spas, release-please]
if: ${{ needs.build-spas.outputs.source_map_overrides != '{}' }}
uses: "./.github/workflows/template-deploy-web.yml"
with:
CLOUDFRONT_ROOT_DISTRIBUTION: ${{ needs.release-please.outputs.root_distribution }}
ROOT_BUCKET: ${{ needs.release-please.outputs.root_bucket }}
SOURCEMAP_OVERRIDES: ${{ needs.build-spas.outputs.source_map_overrides }}
ROOT_SPA_PATH: "packages/Web/Root"
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_ACCESS_KEY_SECRET: ${{ secrets.AWS_ACCESS_KEY_SECRET }}
5 changes: 5 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"packages/Web/Home": "0.1.0",
"packages/Web/Root": "0.1.0",
".": "0.1.0"
}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Changelog

## [0.1.0](https://github.com/Animalmix55/corycherven.com/compare/root-v0.0.1...root-v0.1.0) (2025-02-03)


### Features

* Adds release-please ([c963e81](https://github.com/Animalmix55/corycherven.com/commit/c963e8128081ef3c3ec32db25bf5cb0959c056b6))
* adds support for updating lockfile in PR ([6310b85](https://github.com/Animalmix55/corycherven.com/commit/6310b858e9884ac8301b158e3d4efbfbe797ba1a))
* initial commit ([12d0968](https://github.com/Animalmix55/corycherven.com/commit/12d09688f7e44c286d460ed506e81381c38994c6))


### Bug Fixes

* adds checkout ([f0f4fee](https://github.com/Animalmix55/corycherven.com/commit/f0f4feeb423010f63016b0d96231eefce2e867e4))
* adds perms to RP ([0664c94](https://github.com/Animalmix55/corycherven.com/commit/0664c94cf712d473ac91f6f4fdf7f6908280cc9d))
* adds target branch ([92afb22](https://github.com/Animalmix55/corycherven.com/commit/92afb220ac559de15b7329312164734d40dcf743))
* fixes release paths ([ee239e7](https://github.com/Animalmix55/corycherven.com/commit/ee239e7344b6b9368359822b088961594dda78cc))
* gets proper releasable spas ([56413cf](https://github.com/Animalmix55/corycherven.com/commit/56413cf71d834c0ef11b201b2c11b8dd23e7a02e))
* more perms tweaks ([ddeace6](https://github.com/Animalmix55/corycherven.com/commit/ddeace6b246bf605e0117de1fe91146b18c51993))
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cory/root",
"version": "0.0.1",
"version": "0.1.0",
"private": true,
"workspaces": [
"packages/**/*"
Expand Down
8 changes: 8 additions & 0 deletions packages/Web/Home/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

## [0.1.0](https://github.com/Animalmix55/corycherven.com/compare/web-home-spa-v0.0.1...web-home-spa-v0.1.0) (2025-02-03)


### Features

* initial commit ([12d0968](https://github.com/Animalmix55/corycherven.com/commit/12d09688f7e44c286d460ed506e81381c38994c6))
2 changes: 1 addition & 1 deletion packages/Web/Home/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cory/web-home-spa",
"version": "0.0.1",
"version": "0.1.0",
"scripts": {
"build": "rollup -c",
"build:dev": "rollup -c --environment NODE_ENV:development",
Expand Down
8 changes: 8 additions & 0 deletions packages/Web/Root/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

## [0.1.0](https://github.com/Animalmix55/corycherven.com/compare/web-root-v0.0.1...web-root-v0.1.0) (2025-02-03)


### Features

* initial commit ([12d0968](https://github.com/Animalmix55/corycherven.com/commit/12d09688f7e44c286d460ed506e81381c38994c6))
2 changes: 1 addition & 1 deletion packages/Web/Root/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cory/web-root",
"version": "0.0.1",
"version": "0.1.0",
"scripts": {
"build": "rollup -c",
"build:dev": "rollup -c --environment NODE_ENV:development",
Expand Down
14 changes: 14 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"packages": {
".": {},
"packages/Web/Home": {},
"packages/Web/Root": {}
},
"plugins": [
{
"type": "node-workspace",
"updatePeerDependencies": true
}
],
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}