Skip to content

Commit

Permalink
Merge pull request #335 from Luni-4/improve-deploy
Browse files Browse the repository at this point in the history
Improve deploy actions
  • Loading branch information
fitzgen authored Mar 16, 2023
2 parents 61331dd + 35fcdf3 commit 9f886ff
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
shell: bash
id: tagName
run: |
VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
echo "::set-output name=tag::$VERSION"
VERSION=$(cargo pkgid | cut -d# -f2)
echo "tag=$VERSION" >> $GITHUB_OUTPUT
- name: Build package
id: package
Expand All @@ -37,8 +37,8 @@ jobs:
ARCHIVE_NAME="cargo-fuzz-${{ steps.tagName.outputs.tag }}-$ARCHIVE_TARGET"
ARCHIVE_FILE="${ARCHIVE_NAME}.zip"
7z a ${ARCHIVE_FILE} ./target/release/cargo-fuzz.exe
echo "::set-output name=file::${ARCHIVE_FILE}"
echo "::set-output name=name::${ARCHIVE_NAME}.zip"
echo "file=$ARCHIVE_FILE" >> $GITHUB_OUTPUT
echo "name=$ARCHIVE_NAME.zip" >> $GITHUB_OUTPUT
- name: Upload artifacts
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -84,17 +84,17 @@ jobs:
- name: Get the version
id: tagName
run: |
VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
echo "::set-output name=tag::$VERSION"
VERSION=$(cargo pkgid | cut -d# -f2)
echo "tag=$VERSION" >> $GITHUB_OUTPUT
- name: Build package
id: package
run: |
TAR_FILE=cargo-fuzz-${{ steps.tagName.outputs.tag }}-${{ matrix.target }}
cd target/${{ matrix.target }}/release
tar -czvf $GITHUB_WORKSPACE/$TAR_FILE.tar.gz cargo-fuzz
echo ::set-output "name=name::${TAR_FILE}"
echo ::set-output "name=file::${TAR_FILE}.tar.gz "
echo "name=$TAR_FILE" >> $GITHUB_OUTPUT
echo "file=$TAR_FILE.tar.gz" >> $GITHUB_OUTPUT
- name: Upload artifacts
uses: actions/upload-artifact@v2
Expand All @@ -116,15 +116,11 @@ jobs:
run: |
rustup toolchain install stable --profile minimal --no-self-update
- name: Create Cargo.lock
run: |
cargo update
- name: Get version
id: tagName
run: |
VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
echo "::set-output name=tag::$VERSION"
VERSION=$(cargo pkgid | cut -d# -f2)
echo "tag=$VERSION" >> $GITHUB_OUTPUT
- name: Download artifacts
uses: actions/download-artifact@v2
Expand All @@ -134,7 +130,7 @@ jobs:
- name: Create a release
uses: softprops/action-gh-release@v1
with:
name: v${{ steps.tagName.outputs.tag }}
name: ${{ steps.tagName.outputs.tag }}
files: |
./binaries/**/*.zip
./binaries/**/*.tar.gz
Expand Down

0 comments on commit 9f886ff

Please sign in to comment.