From d40efea8c00ba6ecf3f6d0948d2dcac7698dbcd5 Mon Sep 17 00:00:00 2001 From: Xithrius Date: Mon, 13 Jun 2022 21:49:59 -0700 Subject: [PATCH] Removed releases workflow for now. Commit before deletion exists in branch https://github.com/Xithrius/twitch-tui/tree/binary-releases --- .github/workflows/release.yml | 139 ---------------------------------- 1 file changed, 139 deletions(-) delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 8433493..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,139 +0,0 @@ -name: Release OS binaries - -on: - release: - types: - - published - -jobs: - create-release: - name: create-release - runs-on: ubuntu-latest - - outputs: - upload_url: ${{ steps.release.outputs.upload_url }} - twt_version: ${{ env.TWT_VERSION }} - - steps: - - name: Get the release version from the tag - shell: bash - if: env.TWT_VERSION == '' - run: | - # Apparently, this is the right way to get a tag name. Really? - # - # See: https://github.community/t5/GitHub-Actions/How-to-get-just-the-tag-name/m-p/32167/highlight/true#M1027 - # echo "TWT_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - # echo echo ::set-output name=TWT_VERSION::${GITHUB_REF#refs/tags/} - echo "TWT_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV - echo "version is: ${{ env.TWT_VERSION }}" - - - name: Create GitHub release - id: release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - with: - tag_name: ${{ env.TWT_VERSION }} - release_name: ${{ env.TWT_VERSION }} - - build-release: - name: build-release - needs: ["create-release"] - runs-on: ${{ matrix.os }} - - env: - CARGO: cargo - TARGET_FLAGS: "" - TARGET_DIR: ./target - RUST_BACKTRACE: 1 - - strategy: - matrix: - build: [linux, macos, win-msvc, win-gnu, win32-msvc] - - include: - - build: linux - os: ubuntu-18.04 - rust: stable - target: x86_64-unknown-linux-musl - - - build: macos - os: macos-latest - rust: stable - target: x86_64-apple-darwin - - - build: win-msvc - os: windows-2019 - rust: stable - target: x86_64-pc-windows-msvc - - - build: win-gnu - os: windows-2019 - rust: stable-x86_64-gnu - target: x86_64-pc-windows-gnu - - - build: win32-msvc - os: windows-2019 - rust: stable - target: i686-pc-windows-msvc - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - fetch-depth: 1 - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - profile: minimal - override: true - target: ${{ matrix.target }} - - - name: Cargo flags - shell: bash - run: | - echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV - echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV - - - name: Show command used for Cargo - run: | - echo "cargo command is: ${{ env.CARGO }}" - echo "target flag is: ${{ env.TARGET_FLAGS }}" - echo "target dir is: ${{ env.TARGET_DIR }}" - - - name: Build release binary - run: ${{ env.CARGO }} build --verbose --release ${{ env.TARGET_FLAGS }} - - - name: Strip release binary (linux and macos) - if: matrix.build == 'linux' || matrix.build == 'macos' - run: strip "target/${{ matrix.target }}/release/twitch-tui" - - - name: Build archive - shell: bash - run: | - staging="twitch-tui-${{ needs.create-release.outputs.twt_version }}-${{ matrix.target }}" - mkdir -p "$staging" - cp {README.md,LICENSE} "$staging/" - if [ "${{ matrix.os }}" = "windows-2019" ]; then - cp "target/${{ matrix.target }}/release/twitch-tui.exe" "$staging/" - 7z a "$staging.zip" "$staging" - echo "ASSET=$staging.zip" >> $GITHUB_ENV - else - cp "target/${{ matrix.target }}/release/twitch-tui" "$staging/" - tar czf "$staging.tar.gz" "$staging" - echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV - fi - - - name: Upload release archive - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - with: - upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: ${{ env.ASSET }} - asset_name: ${{ env.ASSET }} - asset_content_type: application/octet-stream