Skip to content

Merge pull request #60 from storacha/fix/loki #81

Merge pull request #60 from storacha/fix/loki

Merge pull request #60 from storacha/fix/loki #81

name: edge-gateway-link
on:
push:
branches:
- main
paths:
- 'packages/edge-gateway-link/**'
- '.github/workflows/edge-gateway-link.yml'
- 'pnpm-lock.yaml'
pull_request:
paths:
- 'packages/edge-gateway-link/**'
- '.github/workflows/edge-gateway-link.yml'
- 'pnpm-lock.yaml'
jobs:
test:
runs-on: ubuntu-latest
name: Test
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install
- run: pnpm test:w3link-edge-gateway
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@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
- run: pnpm install
- name: Publish app
uses: cloudflare/wrangler-action@v3
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/edge-gateway-link'
environment: 'staging'
changelog:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Changelog
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
releases_created: ${{ steps.tag-release.outputs.releases_created }}
steps:
- uses: googleapis/release-please-action@v4
id: tag-release
with:
config-file: .github/release-please-config.json
manifest-file: .github/release-please-manifest.json
token: ${{ secrets.GITHUB_TOKEN }}
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changelog.outputs.releases_created
name: Release
runs-on: ubuntu-latest
needs:
- test
- deploy-staging
- changelog
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: pnpm install
- name: Deploy
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'