Skip to content

Commit

Permalink
chore: update CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
alanshaw committed Oct 10, 2024
1 parent 580ad45 commit d7cb717
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/actions/setup-npm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ description: Setup node and npm
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org'
node-version: 18
node-version: 20
cache: 'npm'
- run: npm ci
shell: bash
17 changes: 10 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ jobs:

changelog:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
releases_created: ${{ steps.tag-release.outputs.releases_created }}
steps:
- uses: google-github-actions/release-please-action@v3
- uses: googleapis/release-please-action@v4
id: tag-release
with:
release-type: node
Expand All @@ -35,12 +38,12 @@ jobs:
if: needs.changelog.outputs.releases_created == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-npm
- uses: cloudflare/wrangler-action@2.0.0
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_TOKEN }}
command: deploy --env staging
environment: 'staging'

release-production:
name: production
Expand All @@ -52,9 +55,9 @@ jobs:
if: needs.changelog.outputs.releases_created
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-npm
- uses: cloudflare/wrangler-action@2.0.0
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_TOKEN }}
command: deploy --env production
environment: 'production'
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-npm
- run: npm test

0 comments on commit d7cb717

Please sign in to comment.