publish .dmg #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## name: Build and Release (Windows) | |
## | |
## on: | |
## push: | |
## tags: | |
## - '*' | |
## | |
## permissions: | |
## contents: write | |
## | |
## jobs: | |
## build-windows: | |
## runs-on: windows-latest | |
## | |
## env: | |
## ## build constants | |
## TARGET: windows | |
## ARCH: x86_64 | |
## VERSION: ${{ github.ref_name }} | |
## ## aws publish constants | |
## AWS_REGION: us-east-1 | |
## S3_BUCKET_NAME: ore-app-xyz | |
## # where dx places the .app | |
## APP_DIR: target\dx\ore-app\bundle\windows\bundle/nsis/OreApp_${{ github.ref_name }}_x64-setup.exe | |
## | |
## steps: | |
## - name: Check out code | |
## uses: actions/checkout@v3 | |
## | |
## - name: Cache Cargo registry | |
## uses: actions/cache@v3 | |
## with: | |
## path: ~/.cargo/registry | |
## key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
## restore-keys: | | |
## ${{ runner.os }}-cargo-registry- | |
## | |
## - name: Cache target directory | |
## uses: actions/cache@v3 | |
## with: | |
## path: target | |
## key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }} | |
## restore-keys: | | |
## ${{ runner.os }}-cargo-target- | |
## | |
## - name: Install Rust | |
## uses: dtolnay/rust-toolchain@stable | |
## with: | |
## profile: minimal | |
## override: true | |
## | |
## - name: Install dioxus-cli | |
## run: | | |
## cargo install [email protected] [email protected] | |
## | |
## - name: Build and Package | |
## run: | | |
## dx bundle --platform desktop --release | |
## | |
## - name: Sign | |
## env: | |
## CARGO_PACKAGER_SIGN_PRIVATE_KEY: ${{ secrets.CARGO_PACKAGER_SIGN_PRIVATE_KEY }} | |
## CARGO_PACKAGER_SIGN_PRIVATE_KEY_PASSWORD: ${{ secrets.CARGO_PACKAGER_SIGN_PRIVATE_KEY_PASSWORD }} | |
## run: | | |
## cargo packager signer sign "" | |
## | |
## # ------------------------------------------ | |
## # Configure AWS credentials & upload to S3 | |
## # ------------------------------------------ | |
## - name: Configure AWS credentials | |
## uses: aws-actions/configure-aws-credentials@v3 | |
## with: | |
## aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
## aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
## aws-region: ${{ env.AWS_REGION }} | |
## | |
## - name: Upload EXE to S3 | |
## run: | | |
## aws s3 cp ` | |
## "${{ env.APP_DIR }}" ` | |
## "s3://${{ env.S3_BUCKET_NAME }}/${{ env.TARGET }}/${{ env.ARCH }}/${{ env.VERSION }}/ore_${{ env.VERSION }}_x64.exe" | |
## | |
## - name: Upload Signature to S3 | |
## run: | | |
## aws s3 cp ` | |
## "${{ env.APP_DIR }}.sig" ` | |
## "s3://${{ env.S3_BUCKET_NAME }}/${{ env.TARGET }}/${{ env.ARCH }}/${{ env.VERSION }}/ore_${{ env.VERSION }}_x64.exe.sig" | |
## | |
## - name: Print S3 download link | |
## run: | | |
## echo "Download EXE at: https://${{ env.S3_BUCKET_NAME }}.s3.amazonaws.com/${{ env.TARGET }}/${{ env.ARCH }}/${{ env.VERSION }}/ore_${{ env.VERSION }}_x64.exe" |