1
+ name : Deploy Move package
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ branch :
7
+ description : ' Name of branch to checkout'
8
+ required : true
9
+ network :
10
+ description : ' Network to deploy to'
11
+ required : true
12
+ faucet :
13
+ description : ' Whether to faucet'
14
+ required : true
15
+ script-path :
16
+ description : ' Script to tun'
17
+ required : true
18
+ dry-run :
19
+ description : ' Run in dry-run mode'
20
+ type : boolean
21
+ required : false
22
+ default : true
23
+
24
+ jobs :
25
+ deploy-move-package :
26
+ environment : release
27
+ name : Deploy Move package and create PR to bump references.
28
+ runs-on : ubuntu-latest
29
+ steps :
30
+
31
+ - name : Check out the repo
32
+ uses : actions/checkout@v4
33
+ with :
34
+ ref : ${{ github.event.inputs.branch }}
35
+
36
+ - name : Start iota sandbox
37
+ uses : ' ./.github/actions/iota-rebase-sandbox/setup'
38
+ with :
39
+ platform : ' linux'
40
+ iota-version : ${{ github.event.inputs.network }}
41
+ start-sandbox : false
42
+
43
+ - name : Setup Keytool
44
+ uses : ' ./.github/actions/iota-rebase-sandbox/load-keytool'
45
+ with :
46
+ network : ${{ github.event.inputs.network }}
47
+ pk : ${{secrets.TRUST_FRAMEWORK_PRODUCTS_PRIVATE_KEY}}
48
+ bak_pk : ${{secrets.TRUST_FRAMEWORK_PRODUCTS_PRIVATE_KEY_BACKUP}} # only for testing, TODO: remove
49
+ faucet : ${{ github.event.inputs.faucet }}
50
+
51
+ - name : Import GPG key
52
+ id : import-gpg
53
+ uses : crazy-max/ghaction-import-gpg@cb4264d3319acaa2bea23d51ef67f80b4f775013
54
+ with :
55
+ gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
56
+ passphrase : ${{ secrets.GPG_PASSPHRASE }}
57
+ git_user_signingkey : true
58
+ git_commit_gpgsign : true
59
+ git_tag_gpgsign : true
60
+
61
+ - name : Run script
62
+ if : ${{ github.event.inputs.dry-run == 'false' }}
63
+ run : |
64
+ source ${{ github.event.inputs.script-path}}
65
+
66
+ - name : Commit changes
67
+ if : ${{ github.event.inputs.dry-run == 'false' }}
68
+ run : |
69
+ git add .
70
+ if [[ $(git diff --stat --staged) == '' ]]; then
71
+ echo 'repository unmodified'
72
+ exit 1
73
+ fi
74
+ git commit -m "bump version"
75
+
76
+ - name : Create Pull Request
77
+ uses : peter-evans/create-pull-request@67df31e08a133c6a77008b89689677067fef169e
78
+ if : ${{ github.event.inputs.dry-run == 'false' }}
79
+ with :
80
+ committer : GitHub <noreply@github.com>
81
+ author : ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
82
+ branch : chore/deploy-${{ github.event.inputs.network }}
83
+ delete-branch : true
84
+ title : ' Deploy ${{ github.event.inputs.network }}'
85
+ body : |
86
+ This PR contains changes running ${{ github.event.inputs.script-path }} on branch:${{ github.event.inputs.branch }} and network:${{ github.event.inputs.network }}
87
+ labels : |
88
+ No changelog
0 commit comments