From 790446ab297f5cb30b4c54b551da8b685e8447f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20K=C3=B8hler=20Warmdahl?= Date: Thu, 28 Nov 2024 10:26:09 +0100 Subject: [PATCH] Test windows setup --- .github/workflows/release.yaml | 151 +++++++++++++++++---------------- 1 file changed, 79 insertions(+), 72 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ee1f52dd0..be7699e23 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -77,91 +77,98 @@ jobs: BASE_VERSION=${{ env.BASE_IMAGE_VERSION }} NODE_VERSION=${{ env.NODE_VERSION }} - release-desktop-wallet-linux: +# release-desktop-wallet-linux: +# environment: release +# needs: login-aws +# runs-on: ubuntu-latest +# container: +# image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" +# credentials: +# username: ${{needs.login-aws.outputs.access_key}} +# password: ${{needs.login-aws.outputs.secret_key}} +# options: -u root +# steps: +# - name: Checkout repository +# uses: actions/checkout@v4 +# with: +# submodules: recursive +# ref: ${{ github.ref_name }} +# +# - name: Install dependencies and build +# run: | +# rustup default stable +# node --version +# npm --version +# yarn --version +# python --version +# rustup show +# wasm-pack --version +# +# yarn +# yarn package +# +# - name: publish +# run: | +# # Extract version number +# VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) +# +# # Prepare filenames +# if [[ $TARGET_NET = "mainnet" ]]; then +# FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" +# FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" +# FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" +# else +# FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" +# FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" +# FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" +# fi +# +# FILENAME_LATEST_LINUX="latest-linux.yml" +# +# OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" +# OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" +# OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" +# OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" +# +# # Push to s3 +# echo ${FILENAME_DEB} +# echo ${FILENAME_RPM} +# echo ${FILENAME_APPIMAGE} +# echo ${FILENAME_LATEST_LINUX} +# aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers +# aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + + release-desktop-wallet-windows: + runs-on: windows-latest environment: release needs: login-aws - runs-on: ubuntu-latest - container: - image: "192549843005.dkr.ecr.eu-west-1.amazonaws.com/concordium/desktop-wallet-ci:test" - credentials: - username: ${{needs.login-aws.outputs.access_key}} - password: ${{needs.login-aws.outputs.secret_key}} - options: -u root steps: - name: Checkout repository uses: actions/checkout@v4 with: submodules: recursive ref: ${{ github.ref_name }} - - - name: Install dependencies and build - run: | - rustup default stable - node --version - npm --version - yarn --version - python --version - rustup show - wasm-pack --version - - yarn - yarn package - - - name: publish + - name: setup run: | # Extract version number VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) - # Prepare filenames if [[ $TARGET_NET = "mainnet" ]]; then - FILENAME_DEB="concordium-desktop-wallet-${VERSION}.deb" - FILENAME_RPM="concordium-desktop-wallet-${VERSION}.rpm" - FILENAME_APPIMAGE="concordium-desktop-wallet-${VERSION}.AppImage" + FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" else - FILENAME_DEB="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.deb" - FILENAME_RPM="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.rpm" - FILENAME_APPIMAGE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.AppImage" + FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" fi - - FILENAME_LATEST_LINUX="latest-linux.yml" - - OUT_FILENAME_DEB="${VERSION}/${TARGET_NET}/${FILENAME_DEB}" - OUT_FILENAME_RPM="${VERSION}/${TARGET_NET}/${FILENAME_RPM}" - OUT_FILENAME_APPIMAGE="${VERSION}/${TARGET_NET}/${FILENAME_APPIMAGE}" - OUT_LATEST_LINUX="${VERSION}/${TARGET_NET}/latest-linux.yml" - - # Push to s3 - echo ${FILENAME_DEB} - echo ${FILENAME_RPM} - echo ${FILENAME_APPIMAGE} - echo ${FILENAME_LATEST_LINUX} -# aws s3 cp "release/${FILENAME_DEB}" "${{env.S3_BUCKET}}/${OUT_FILENAME_DEB}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_RPM}" "${{env.S3_BUCKET}}/${OUT_FILENAME_RPM}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_APPIMAGE}" "${{env.S3_BUCKET}}/${OUT_FILENAME_APPIMAGE}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers -# aws s3 cp "release/${FILENAME_LATEST_LINUX}" "${{env.S3_BUCKET}}/${OUT_LATEST_LINUX}" --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - -# release-desktop-wallet-windows: -# runs-on: windows-latest -# steps: -# - name: setup -# run: | -# # Extract version number -# VERSION=$(awk '/"version":/ { print substr($2, 2, length($2)-3); exit }' app/package.json) -# -# if [[ $TARGET_NET = "mainnet" ]]; then -# FILENAME_EXE="concordium-desktop-wallet-${VERSION}.exe" -# else -# FILENAME_EXE="concordium-desktop-wallet-${TARGET_NET}-${VERSION}.exe" -# fi -# -# OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" -# -# check_uniqueness() { -# # Fail if file already exists -# totalFoundObjects=$(aws s3 ls "${S3_BUCKET}/$1" --summarize | grep "Total Objects: " | sed 's/[^0-9]*//g') -# if [ "$totalFoundObjects" -ne "0" ]; then -# echo "${S3_BUCKET}/$1 already exists" -# false -# fi -# } + + OUT_FILENAME_EXE="${VERSION}/${TARGET_NET}/${FILENAME_EXE}" + + check_uniqueness() { + # Fail if file already exists + totalFoundObjects=$(aws s3 ls "${{env.S3_BUCKET}}/$1" --summarize | grep "Total Objects: " | sed 's/[^0-9]*//g') + if [ "$totalFoundObjects" -ne "0" ]; then + echo "${{env.S3_BUCKET}}/$1 already exists" + false + fi + } \ No newline at end of file