Skip to content

Commit a370a3a

Browse files
committed
Fix IPFS deployment workflow
1 parent ffc3181 commit a370a3a

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

.github/workflows/deploy-ipfs.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
name: Release
1+
name: Release and deploy to IPFS
22
on:
3-
schedule:
4-
- cron: '0 10 * * 1-4' # run 12:00 UTC+2 Monday-Thursday
3+
pull_request:
4+
types:
5+
- closed
6+
57
workflow_dispatch:
68
inputs:
79
debug_enabled:
@@ -12,6 +14,7 @@ on:
1214

1315
jobs:
1416
tag:
17+
if: github.event.pull_request.merged == true
1518
runs-on: ubuntu-latest
1619
outputs:
1720
new_tag: ${{ steps.github-tag-action.outputs.new_tag }}
@@ -26,10 +29,12 @@ jobs:
2629
# new_tag is only set when there are new semver commits
2730
# on the release branch
2831
release_branches: release
29-
default_bump: patch
32+
# bumps have to be set explicitly
33+
default_bump: false
3034

3135
release:
3236
needs: tag
37+
environment: production
3338
# only release when there is a new tag
3439
if: ${{ needs.tag.outputs.new_tag != null }}
3540
runs-on: ubuntu-latest
@@ -39,13 +44,6 @@ jobs:
3944
- name: Add .env files
4045
run: echo ${{secrets.ENV_WEBSITE_BASE64}} | base64 -d > ./packages/website/.env
4146

42-
- name: Setup tmate session
43-
uses: mxschmitt/action-tmate@v3
44-
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
45-
timeout-minutes: 15
46-
with:
47-
limit-access-to-actor: true
48-
4947
- name: Build
5048
env:
5149
CI: true
@@ -55,9 +53,18 @@ jobs:
5553
yarn workspace @package/dump-pow-website run build
5654
yarn workspace @package/dump-pow-website run export
5755
56+
- name: Setup tmate session
57+
uses: mxschmitt/action-tmate@v3
58+
# only start the session when enable via manual workflow trigger and the previous step failed
59+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled && ${{ failure() }}}}
60+
timeout-minutes: 15
61+
with:
62+
limit-access-to-actor: true
63+
5864
- uses: aquiladev/[email protected]
5965
id: upload
6066
with:
67+
path: ./packages/website/out
6168
service: pinata
6269
pinataKey: ${{ secrets.PINATA_KEY }}
6370
pinataSecret: ${{ secrets.PINATA_SECRET }}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ yarn
2121

2222
Afterwards make sure that you've created the `.env` files inside every package.
2323

24-
More instructions to follow...
24+
25+
More instructions to follow...

packages/contracts/hardhat.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (isCI) {
2020
);
2121
config = {
2222
solidity: {
23-
version: "0.8.9"
23+
version: "0.8.16"
2424
}
2525
};
2626
} else {

0 commit comments

Comments
 (0)