diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 900be2a..1fb4108 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,7 +39,7 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.68.0 + toolchain: 1.67.0 target: ${{ matrix.target }} override: true - name: Install linker @@ -60,7 +60,7 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.68.0 + toolchain: 1.67.0 override: true components: rustfmt, clippy - name: Checkout diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ed2c7c..42f7f22 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: env: REF: ${{ github.ref }} shell: bash - run: echo ::set-output name=VERSION::${REF/refs\/tags\//} + run: echo "VERSION=${REF/refs\/tags\//}" >> $GITHUB_OUTPUT build-upload: name: Build & Upload needs: [create-release, read-version] @@ -58,7 +58,7 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.68.0 + toolchain: 1.67.0 target: ${{ matrix.target }} override: true - name: Install linker @@ -76,27 +76,40 @@ jobs: env: BUILD_NAME: ${{ env.NAME }}-${{ needs.read-version.outputs.version }}-${{ matrix.target }} shell: bash - run: echo ::set-output name=BUILD_NAME::$BUILD_NAME + run: echo "BUILD_NAME=$BUILD_NAME" >> $GITHUB_OUTPUT - name: Ready artifacts env: - BUILD_NAME: ${{ steps.vars.outputs.BUILD_NAME }} TARGET: ${{ matrix.target }} shell: bash run: | - mkdir $BUILD_NAME - cp target/$TARGET/release/$NAME LICENSE $BUILD_NAME + mkdir upload + cp target/$TARGET/release/$NAME LICENSE upload - name: Compress artifacts - uses: papeloto/action-zip@v1 + uses: vimtor/action-zip@v1 with: - files: ${{ steps.vars.outputs.BUILD_NAME }}/ - recursive: false - dest: ${{ steps.vars.outputs.BUILD_NAME }}.zip + files: upload/ + recursive: true + dest: upload.zip - name: Upload artifacts uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ needs.create-release.outputs.upload_url }} - asset_path: ./${{ steps.vars.outputs.BUILD_NAME }}.zip + asset_path: ./upload.zip asset_name: ${{ steps.vars.outputs.BUILD_NAME }}.zip asset_content_type: application/zip + - name: Calculate checksum + id: calculate + shell: bash + run: | + echo $(sha256sum upload.zip | cut -d ' ' -f 1) > sha256sum.txt + - name: Upload checksums + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ needs.create-release.outputs.upload_url }} + asset_path: ./sha256sum.txt + asset_name: ${{ steps.vars.outputs.BUILD_NAME }}_sha256sum.txt + asset_content_type: text/plain