Skip to content

Commit 79d468e

Browse files
committed
separate environment from jobs
1 parent 1133401 commit 79d468e

File tree

1 file changed

+0
-81
lines changed

1 file changed

+0
-81
lines changed

.github/workflows/release.yaml

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ jobs:
136136
needs: [validate-preconditions]
137137
runs-on: ubuntu-latest
138138
if: contains(fromJSON('["rc", "alpha", "database-exporter"]'), needs.validate-preconditions.outputs.release_type)
139-
environment: release
140139
steps:
141140

142141
- name: Checkout Repository
@@ -168,22 +167,9 @@ jobs:
168167
id=$(docker create build-deb:${{ github.run_id }})
169168
docker cp $id:/build/${{ github.job }}_${{ needs.validate-preconditions.outputs.version }}.deb .
170169
171-
- name: Configure AWS Credentials
172-
uses: aws-actions/configure-aws-credentials@v4
173-
with:
174-
role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }}
175-
role-session-name: ${{ env.PROJECT_NAME }}Session
176-
aws-region: "eu-west-1"
177-
178-
- name: Publish
179-
run: |
180-
OUTFILE=$(echo '${{ needs.validate-preconditions.outputs.s3_arns }}' | jq -r '.["${{ github.job }}"]')
181-
aws s3 cp "${{ github.job }}_${{ needs.validate-preconditions.outputs.version }}.deb" \
182-
"$OUTFILE" --grants=read=uri=http://acs.amazonaws.com/groups/global/AllUsers
183170
184171
p2p-bootstrapper:
185172
runs-on: ubuntu-latest
186-
environment: release
187173
if: contains(fromJSON('["rc", "alpha", "p2p-bootstrapper"]'), needs.validate-preconditions.outputs.release_type)
188174
needs: [build-static-binaries, validate-preconditions]
189175
steps:
@@ -201,16 +187,6 @@ jobs:
201187
with:
202188
submodules: recursive
203189

204-
- name: Precheck - Validate Version and Check S3 for existing files
205-
run: |
206-
# Check if the file already exists in S3
207-
OUTFILE="s3://distribution.concordium.software/tools/linux/p2p-bootstrapper_${{ needs.validate-preconditions.outputs.version }}.deb"
208-
totalFoundObjects=$(aws s3 ls "$OUTFILE" --summarize | grep "Total Objects: " | sed "s/[^0-9]*//g")
209-
if [ "$totalFoundObjects" -ne "0" ]; then
210-
echo "error: $OUTFILE already exists"
211-
exit 1
212-
fi
213-
214190
- name: Build Docker Image
215191
uses: docker/build-push-action@v6
216192
with:
@@ -233,24 +209,10 @@ jobs:
233209
id=$(docker create build-deb:${{ github.run_id }})
234210
docker cp $id:/build/${{ github.job }}_${{ needs.validate-preconditions.outputs.version }}.deb .
235211
236-
- name: Configure AWS Credentials
237-
uses: aws-actions/configure-aws-credentials@v4
238-
with:
239-
role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }}
240-
role-session-name: ${{ github.job }}Session
241-
aws-region: "eu-west-1"
242-
243-
- name: Publish
244-
run: |
245-
OUTFILE=$(echo '${{ needs.validate-preconditions.outputs.s3_arns }}' | jq -r '.["${{ github.job }}"]')
246-
aws s3 cp "${{ github.job }}_${{ needs.validate-preconditions.outputs.version }}.deb" \
247-
"$OUTFILE" --grants=read=uri=http://acs.amazonaws.com/groups/global/AllUsers
248-
249212
node-windows:
250213
runs-on: windows-latest
251214
needs: [validate-preconditions]
252215
if: contains(fromJSON('["rc", "alpha", "node-windows"]'), needs.validate-preconditions.outputs.release_type)
253-
environment: release
254216
defaults:
255217
run:
256218
shell: pwsh
@@ -314,25 +276,10 @@ jobs:
314276
- name: Build Windows Node
315277
run: ./scripts/distribution/windows/build-all.ps1 -nodeVersion ${{ needs.validate-preconditions.outputs.version }} -rustVersion ${{ env.RUST_VERSION }}
316278

317-
- name: Configure AWS Credentials
318-
uses: aws-actions/configure-aws-credentials@v4
319-
with:
320-
role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }}
321-
role-session-name: ${{ github.job }}Session
322-
aws-region: "eu-west-1"
323-
324-
- name: Publish
325-
shell: bash
326-
run: |
327-
OUTFILE=$(echo '${{ needs.validate-preconditions.outputs.s3_arns }}' | jq -r '.["${{ github.job }}"]')
328-
aws s3 cp ./service/windows/installer/Node.msi \
329-
"$OUTFILE" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
330-
331279
node-macos:
332280
runs-on: macos-latest-large
333281
needs: [validate-preconditions]
334282
if: contains(fromJSON('["rc", "alpha", "node-macos"]'), needs.validate-preconditions.outputs.release_type)
335-
environment: release
336283
steps:
337284
- name: Checkout Repository
338285
uses: actions/checkout@v4
@@ -370,19 +317,6 @@ jobs:
370317
run: |
371318
printf "N\n" | ./scripts/distribution/macOS-package/build.sh ${{ needs.validate-preconditions.outputs.version }}
372319
373-
- name: Configure AWS Credentials
374-
uses: aws-actions/configure-aws-credentials@v4
375-
with:
376-
role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }}
377-
role-session-name: ${{ github.job }}Session
378-
aws-region: "eu-west-1"
379-
380-
- name: Publish
381-
run: |
382-
OUTFILE=$(echo '${{ needs.validate-preconditions.outputs.s3_arns }}' | jq -r '.["${{ github.job }}"]')
383-
aws s3 cp ./scripts/distribution/macOS-package/build/packages/concordium-node-${{ needs.validate-preconditions.outputs.version }}-unsigned.pkg \
384-
"$OUTFILE" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
385-
386320
generate-matrix:
387321
runs-on: ubuntu-latest
388322
needs: [validate-preconditions]
@@ -437,7 +371,6 @@ jobs:
437371

438372
node-linux:
439373
runs-on: ubuntu-latest
440-
environment: release
441374
if: contains(fromJSON('["rc", "alpha", "node-linux"]'), needs.validate-preconditions.outputs.release_type)
442375
needs: [ build-static-binaries, validate-preconditions, generate-matrix ]
443376
env:
@@ -507,25 +440,11 @@ jobs:
507440
build_listen_port=${{ matrix.node.listen_port }}
508441
build_bootstrap=bootstrap.${{ env.DOMAIN }}:8888
509442
510-
- name: Configure AWS Credentials
511-
uses: aws-actions/configure-aws-credentials@v4
512-
with:
513-
role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }}
514-
role-session-name: ${{ env.PROJECT_NAME }}Session
515-
aws-region: "eu-west-1"
516-
517443
- name: Run Docker and Extract Artifacts
518444
run: |
519445
id=$(docker create ${{ matrix.node.env }}-deb)
520446
docker cp $id:/out/concordium-${{ matrix.node.env }}-node_${{ needs.validate-preconditions.outputs.base_version }}_amd64.deb .
521447
522-
- name: Publish
523-
run: |
524-
OUTFILE=$(echo '${{ needs.validate-preconditions.outputs.s3_arns }}' | jq -r '.["${{ env.PROJECT_NAME }}"]')
525-
aws s3 cp concordium-${{ matrix.node.env }}-node_${{ needs.validate-preconditions.outputs.base_version }}_amd64.deb \
526-
"$OUTFILE" --grants=read=uri=http://acs.amazonaws.com/groups/global/AllUsers
527-
528-
529448
docker:
530449
runs-on: ubuntu-latest
531450
environment: release

0 commit comments

Comments
 (0)