@@ -2,8 +2,6 @@ name: Build and Push rosetta
2
2
3
3
on :
4
4
push :
5
- branches :
6
- - ekw/SRE-999/release-rosetta
7
5
tags :
8
6
- " *.*.*"
9
7
@@ -33,109 +31,108 @@ jobs:
33
31
id : version
34
32
run : |
35
33
CARGO_VERSION=$(yq .package.version "Cargo.toml")
36
- if [ ! "1.2.0 " = "$CARGO_VERSION" ] ; then
34
+ if [ ! "${{ github.ref_name }} " = "$CARGO_VERSION" ] ; then
37
35
echo "::error::$CARGO_VERSION does not match ${{ github.ref_name }}."
38
36
exit 1
39
37
fi
40
38
echo "outfile=${{ env.OUTFOLDER }}/windows/concordium-rosetta-test-$CARGO_VERSION" >> $GITHUB_OUTPUT
41
39
42
- # release-rosetta-macos:
43
- # needs: rosetta-version
44
- # runs-on: macos-latest
45
- # environment: release
46
- # env:
47
- # OUTFILE: ${{needs.rosetta-version.outputs.OUTFILE_SHORT}}
48
- # steps:
49
- # - name: Checkout Repository
50
- # uses: actions/checkout@v4
51
- # with:
52
- # ref: ${{ github.ref_name }}
53
- # submodules: recursive
54
- #
55
- # - name: Configure AWS Credentials
56
- # uses: aws-actions/configure-aws-credentials@v4
57
- # with:
58
- # aws-region: "eu-west-1"
59
- # role-to-assume: ${{ env.IAM_ROLE }}
60
- # role-session-name: ReleaseRosettaSession
61
- #
62
- #
63
- # - name: Check if version exist in s3
64
- # run: |
65
- # set +e
66
- # output=$(aws s3 ls "${{ env.OUTFILE }}")
67
- # ec=$?
68
- # if [ $ec -eq "0" ]; then
69
- # echo "Objects found ${{ env.OUTFILE }}"
70
- # exit 1
71
- # elif [ $ec -ne "1" ]; then
72
- # echo "$output"
73
- # fi
74
- #
75
- # - name: Build
76
- # run: |
77
- # rustup default ${{ env.RUST_IMAGE_TAG }}
78
- # cargo run --release -- --version
79
- #
80
- # - name: Publish
81
- # run: |
82
- # echo ${{ env.OUTFILE }}
83
- # # aws s3 cp ./target/release/concordium-rosetta ${{ env.OUTFILE }}
84
- #
85
- # release-rosetta-windows:
86
- # runs-on: windows-latest
87
- # needs: rosetta-version
88
- # environment: release
89
- # env:
90
- # OUTFILE: "${{needs.rosetta-version.outputs.OUTFILE_SHORT}}.exe"
91
- # steps:
92
- # - name: Checkout Repository
93
- # uses: actions/checkout@v4
94
- # with:
95
- # ref: ${{ github.ref_name }}
96
- # submodules: recursive
97
- #
98
- # - name: Configure AWS Credentials
99
- # uses: aws-actions/configure-aws-credentials@v4
100
- # with:
101
- # aws-region: "eu-west-1"
102
- # role-to-assume: ${{ env.IAM_ROLE }}
103
- # role-session-name: ReleaseRosettaSession
104
- #
105
- #
106
- # - name: Check if version exist in s3
107
- # run: |-
108
- # set +e
109
- # output=$(aws s3 ls "${{ env.OUTFILE }}")
110
- # ec=$?
111
- # if [ $ec -eq "0" ]; then
112
- # echo "Objects found ${{ env.OUTFILE }}"
113
- # exit 1
114
- # elif [ $ec -ne "1" ]; then
115
- # echo "$output"
116
- # fi
117
- # shell: bash
118
- #
119
- # - name: Build
120
- # run: |
121
- # rustup default ${{ env.RUST_IMAGE_TAG }}
122
- # cargo run --release -- --version
123
- #
124
- # - name: Publish
125
- # run: |
126
- # echo ${{ env.OUTFILE }}
127
- # # aws s3 cp ./target/release/concordium-rosetta.exe ${{ env.OUTFILE }}
40
+ release-rosetta-macos :
41
+ needs : rosetta-version
42
+ runs-on : macos-latest
43
+ environment : release
44
+ env :
45
+ OUTFILE : ${{needs.rosetta-version.outputs.OUTFILE_SHORT}}
46
+ steps :
47
+ - name : Checkout Repository
48
+ uses : actions/checkout@v4
49
+ with :
50
+ ref : ${{ github.ref_name }}
51
+ submodules : recursive
52
+
53
+ - name : Configure AWS Credentials
54
+ uses : aws-actions/configure-aws-credentials@v4
55
+ with :
56
+ aws-region : " eu-west-1"
57
+ role-to-assume : ${{ env.IAM_ROLE }}
58
+ role-session-name : ReleaseRosettaSession
59
+
60
+
61
+ - name : Check if version exist in s3
62
+ run : |
63
+ set +e
64
+ output=$(aws s3 ls "${{ env.OUTFILE }}")
65
+ ec=$?
66
+ if [ $ec -eq "0" ]; then
67
+ echo "Objects found ${{ env.OUTFILE }}"
68
+ exit 1
69
+ elif [ $ec -ne "1" ]; then
70
+ echo "$output"
71
+ fi
72
+
73
+ - name : Build
74
+ run : |
75
+ rustup default ${{ env.RUST_IMAGE_TAG }}
76
+ cargo run --release -- --version
77
+
78
+ - name : Publish
79
+ run : |
80
+ aws s3 cp ./target/release/concordium-rosetta ${{ env.OUTFILE }}
81
+
82
+ release-rosetta-windows :
83
+ runs-on : windows-latest
84
+ needs : rosetta-version
85
+ environment : release
86
+ env :
87
+ OUTFILE : " ${{needs.rosetta-version.outputs.OUTFILE_SHORT}}.exe"
88
+ steps :
89
+ - name : Checkout Repository
90
+ uses : actions/checkout@v4
91
+ with :
92
+ ref : ${{ github.ref_name }}
93
+ submodules : recursive
94
+
95
+ - name : Configure AWS Credentials
96
+ uses : aws-actions/configure-aws-credentials@v4
97
+ with :
98
+ aws-region : " eu-west-1"
99
+ role-to-assume : ${{ env.IAM_ROLE }}
100
+ role-session-name : ReleaseRosettaSession
101
+
102
+
103
+ - name : Check if version exist in s3
104
+ run : |-
105
+ set +e
106
+ output=$(aws s3 ls "${{ env.OUTFILE }}")
107
+ ec=$?
108
+ if [ $ec -eq "0" ]; then
109
+ echo "Objects found ${{ env.OUTFILE }}"
110
+ exit 1
111
+ elif [ $ec -ne "1" ]; then
112
+ echo "$output"
113
+ fi
114
+ shell : bash
115
+
116
+ - name : Build
117
+ run : |
118
+ rustup default ${{ env.RUST_IMAGE_TAG }}
119
+ cargo run --release -- --version
120
+
121
+ - name : Publish
122
+ run : |
123
+ aws s3 cp ./target/release/concordium-rosetta.exe ${{ env.OUTFILE }}
124
+
128
125
release-rosetta-docker :
129
126
runs-on : ubuntu-latest
130
127
environment : release
131
128
steps :
132
129
133
- # - name: Login to Docker Hub
134
- # if: ${{ secrets.DOCKERHUB_TOKEN }}
135
- # uses: docker/login-action@v3
136
- # with:
137
- # username: 'concordium'
138
- # password: ${{ secrets.DOCKERHUB_TOKEN }}
130
+ - name : Login to Docker Hub
131
+ if : ${{ secrets.DOCKERHUB_TOKEN }}
132
+ uses : docker/login-action@v3
133
+ with :
134
+ username : ' concordium'
135
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
139
136
140
137
- name : Checkout Repository
141
138
uses : actions/checkout@v4
@@ -144,10 +141,8 @@ jobs:
144
141
submodules : recursive
145
142
146
143
- name : Set image tag if correctly formatted
147
- env :
148
- TAG : ${{ github.ref_name }}
149
144
run : |
150
- TAG_VERSION='1.2.0'
145
+ TAG_VERSION=${{ github.ref_name }}
151
146
if [ -n "Cargo.toml" ] ; then
152
147
CARGO_VERSION=$(yq .package.version "Cargo.toml")
153
148
if [ ! "$TAG_VERSION" = "$CARGO_VERSION" ] ; then
@@ -174,7 +169,7 @@ jobs:
174
169
file : Dockerfile
175
170
tags : ${{ env.FULL_IMAGE_TAG }}
176
171
no-cache : true
177
- push : false
172
+ push : true
178
173
build-args : |
179
174
base_image=${{ env.BASE_IMAGE }}
180
175
build_image=rust:${{ env.RUST_IMAGE_TAG }}-slim-bullseye
0 commit comments