Skip to content

Commit

Permalink
Merge pull request #53 from storacha/fix/update-release-please-action
Browse files Browse the repository at this point in the history
fix: update github workflow
  • Loading branch information
BravoNatalie authored Nov 21, 2024
2 parents b9fcc3a + b02f3cf commit 14c7fb6
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 21 deletions.
9 changes: 9 additions & 0 deletions .github/release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"release-type": "node",
"include-component-in-tag": true,
"packages": {
"packages/edge-gateway-link": {
"package-name": "w3link-edge-gateway"
}
}
}
3 changes: 3 additions & 0 deletions .github/release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"packages/edge-gateway-link": "1.3.2"
}
47 changes: 26 additions & 21 deletions .github/workflows/edge-gateway-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ jobs:
runs-on: ubuntu-latest
name: Test
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.0.1
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 6.32.x
- uses: actions/setup-node@v2
version: 7.0.x
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install
- run: pnpm test:w3link-edge-gateway
deploy-staging:
Expand All @@ -30,16 +33,17 @@ jobs:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.0.1
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 6.32.x
- uses: actions/setup-node@v2
version: 7.0.x
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install
- name: Publish app
uses: cloudflare/wrangler-action@2.0.0
uses: cloudflare/wrangler-action@v3
env:
ENV: 'staging' # inform the build process what the env is
SENTRY_TOKEN: ${{secrets.SENTRY_TOKEN}}
Expand All @@ -52,17 +56,18 @@ jobs:
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: GoogleCloudPlatform/release-please-action@v3
- uses: googleapis/release-please-action@v4
id: tag-release
with:
path: packages/edge-gateway-link
config-file: .github/release-please-config.json
manifest-file: .github/release-please-manifest.json
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
monorepo-tags: true
package-name: w3link-edge-gateway
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changelog.outputs.releases_created
name: Release
Expand All @@ -72,18 +77,18 @@ jobs:
- deploy-staging
- changelog
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.0.1
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 6.32.x
- uses: actions/setup-node@v2
version: 7.0.x
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: 16
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- run: pnpm install
- name: Deploy
uses: cloudflare/wrangler-action@2.0.0
uses: cloudflare/wrangler-action@v3
env:
ENV: 'production' # inform the build process what the env is
SENTRY_TOKEN: ${{ secrets.SENTRY_TOKEN }}
Expand Down

0 comments on commit 14c7fb6

Please sign in to comment.