-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rework deployment scripts to match freeway
release-please is currently deploying all merges to main to production and untangling the existing build script is exhausting - we have a simpler system in Freeway, so I've taken the opportunity to port that over here.
- Loading branch information
Showing
4 changed files
with
80 additions
and
98 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Test | ||
description: 'Setup and test' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
registry-url: 'https://registry.npmjs.org' | ||
node-version: 20 | ||
cache: 'pnpm' | ||
- run: pnpm test:w3link-edge-gateway | ||
shell: bash |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
name: Release | ||
jobs: | ||
release-staging: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/test | ||
- name: Deploy to Staging | ||
uses: cloudflare/wrangler-action@v3 | ||
env: | ||
ENV: 'staging' | ||
SENTRY_TOKEN: ${{secrets.SENTRY_TOKEN}} | ||
SENTRY_UPLOAD: ${{ secrets.SENTRY_UPLOAD }} | ||
with: | ||
apiToken: ${{secrets.CF_GATEWAY_TOKEN }} | ||
workingDirectory: 'packages/edge-gateway-link' | ||
environment: 'staging' | ||
release-production: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: google-github-actions/release-please-action@v4 | ||
id: release | ||
with: | ||
release-type: node | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/test | ||
- name: Deploy to Production | ||
uses: cloudflare/wrangler-action@v3 | ||
env: | ||
ENV: 'production' # inform the build process what the env is | ||
SENTRY_TOKEN: ${{ secrets.SENTRY_TOKEN }} | ||
SENTRY_UPLOAD: ${{ secrets.SENTRY_UPLOAD }} | ||
with: | ||
apiToken: ${{ secrets.CF_GATEWAY_TOKEN }} | ||
workingDirectory: 'packages/edge-gateway-link' | ||
environment: 'production' | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Test | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/test |