Skip to content

Commit

Permalink
Add windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilKWarmdahl committed Nov 19, 2024
1 parent 3ac94de commit d73e7c4
Showing 1 changed file with 46 additions and 4 deletions.
50 changes: 46 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "*.*.*"

env:
RUST_IMAGE_TAG: '1.73.0'
RUST_IMAGE_TAG: '1.73'
OUTFOLDER: "s3://distribution.concordium.software/tools"
IAM_ROLE: "arn:aws:iam::192549843005:role/github_concordium-rosetta"

Expand Down Expand Up @@ -37,8 +37,51 @@ jobs:
- name: Get the rosetta version
run: |
CARGO_VERSION=$(yq .package.version "Cargo.toml")
echo "ROSETTA_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
echo "OUTFILE=${{ env.OUTFOLDER }}/macos/concordium-rosetta-${{ env.ROSATTE_VERSION }}" >> $GITHUB_ENV
echo "OUTFILE=${{ env.OUTFOLDER }}/macos/concordium-rosetta-${CARGO_VERSION}}" >> $GITHUB_ENV
- name: Check if version exist in s3
run: |
set +e
output=$(aws s3 ls "${{ env.OUTFILE }}")
ec=$?
if [ $ec -eq "0" ]; then
echo "Objects found ${{ env.OUTFILE }}"
exit 1
elif [ $ec -ne "1"]; then
echo "$output"
fi
- name: Build
run: |
rustup default ${{ env.RUST_IMAGE_TAG }}
cargo run --release -- --version
- name: Publish
run: |
echo ${{ env.OUTFILE }}
# aws s3 cp ./target/release/concordium-rosetta ${{ env.OUTFILE }}

release-rosetta-windows:
runs-on: windows-latest
environment: release
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
submodules: recursive

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: "eu-west-1"
role-to-assume: ${{ env.IAM_ROLE }}
role-session-name: ReleaseRosettaSession

- name: Get the rosetta version
run: |
CARGO_VERSION=$(yq .package.version "Cargo.toml")
echo "OUTFILE=${{ env.OUTFOLDER }}/windows/concordium-rosetta-${ CARGO_VERSION }.exe" >> $GITHUB_ENV
- name: Check if version exist in s3
run: |
Expand All @@ -60,5 +103,4 @@ jobs:
- name: Publish
run: |
echo ${{ env.OUTFILE }}
ls ./target/release/
# aws s3 cp ./target/release/concordium-rosetta ${{ env.OUTFILE }}

0 comments on commit d73e7c4

Please sign in to comment.