-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
107 additions
and
1 deletion.
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,107 @@ | ||
name: denylist | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'packages/denylist/**' | ||
- '.github/workflows/denylist.yml' | ||
- 'pnpm-lock.yaml' | ||
pull_request: | ||
paths: | ||
- 'packages/denylist/**' | ||
- '.github/workflows/denylist.yml' | ||
- 'pnpm-lock.yaml' | ||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
name: Test | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 6.32.x | ||
- uses: actions/setup-node@v2 | ||
- run: pnpm install | ||
- run: pnpm build:denylist | ||
- name: Lint | ||
run: pnpm lint | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Test | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 6.32.x | ||
- uses: actions/setup-node@v2 | ||
- run: pnpm install | ||
- run: pnpm test:denylist | ||
deploy-staging: | ||
name: Deploy Staging | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
needs: test | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 6.32.x | ||
- uses: actions/setup-node@v2 | ||
with: | ||
cache: 'pnpm' | ||
- run: pnpm install | ||
- name: Publish app | ||
uses: cloudflare/[email protected] | ||
env: | ||
ENV: 'staging' # 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/denylist' | ||
environment: 'staging' | ||
changelog: | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
name: Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
releases_created: ${{ steps.tag-release.outputs.releases_created }} | ||
steps: | ||
- uses: GoogleCloudPlatform/release-please-action@v3 | ||
id: tag-release | ||
with: | ||
path: packages/denylist | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
release-type: node | ||
monorepo-tags: true | ||
package-name: denylist | ||
release: | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changelog.outputs.releases_created | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: | ||
- check | ||
- test | ||
- changelog | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 6.32.x | ||
- uses: actions/setup-node@v2 | ||
with: | ||
cache: 'pnpm' | ||
node-version: 16 | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: pnpm install | ||
- name: Deploy | ||
uses: cloudflare/[email protected] | ||
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/denylist' | ||
environment: 'production' |
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