From 631dd91639cf01c57a7552200e214ef365848221 Mon Sep 17 00:00:00 2001 From: sjquant Date: Sat, 31 Aug 2024 16:54:03 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 80 +++++++++++++++++------------------ 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 91acc37..55f6f5c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: release on: push: tags: - - "v[0-9]+.[0-9]+.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+" concurrency: group: ${{ github.sha }} @@ -16,50 +16,50 @@ jobs: strategy: matrix: 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: linux + os: ubuntu-20.04 + rust: stable + target: x86_64-unknown-linux-musl + - build: macos + os: macos-latest + rust: stable + target: x86_64-apple-darwin env: RUST_BACKTRACE: full TARGET_DIR: ./target steps: - - name: Checkout repository - uses: actions/checkout@v2 + - name: Checkout repository + uses: actions/checkout@v2 - - name: Get the release version from the tag - shell: bash - if: env.FLOPHA_VERSION == '' - run: | - echo "FLOPHA_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV - echo "version is: ${{ env.FLOPHA_VERSION }}" + - name: Get the release version from the tag + shell: bash + if: env.FLOPHA_VERSION == '' + run: | + echo "FLOPHA_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + echo "version is: ${{ env.FLOPHA_VERSION }}" - - name: Install packages (Ubuntu) - if: matrix.os == 'ubuntu-18.04' - run: | - sudo apt-get update - sudo apt-get install -y musl-tools - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - profile: minimal - override: true + - name: Install packages (Ubuntu) + if: matrix.os == 'ubuntu-20.04' + run: | + sudo apt-get update + sudo apt-get install -y musl-tools - - name: Build and Package - shell: bash - run: | - scripts/package.sh --target ${{ matrix.target }} - echo "ASSET=dist/flopha-${{ matrix.target }}.tar.gz" >> $GITHUB_ENV + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + profile: minimal + override: true - - name: Upload release archive - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - token: ${{ secrets.FLOPHA_GITHUB_TOKEN }} - files: ${{ env.ASSET }} \ No newline at end of file + - name: Build and Package + shell: bash + run: | + scripts/package.sh --target ${{ matrix.target }} + echo "ASSET=dist/flopha-${{ matrix.target }}.tar.gz" >> $GITHUB_ENV + + - name: Upload release archive + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ env.FLOPHA_VERSION }} + generate_release_notes: True + files: ${{ env.ASSET }}