Remove unnecessary steps from deploy
This commit is contained in:
parent
9d156723c0
commit
820667c608
1 changed files with 5 additions and 36 deletions
41
.github/workflows/deploy.yml
vendored
41
.github/workflows/deploy.yml
vendored
|
|
@ -6,7 +6,7 @@ on:
|
|||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
create-binaries:
|
||||
deploy-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
@ -19,49 +19,18 @@ jobs:
|
|||
- name: Build oxipng
|
||||
run: |
|
||||
cargo build --release
|
||||
strip target/release/oxipng.exe
|
||||
- name: Create zip
|
||||
run: |
|
||||
$OXIPNG_PATH="$Env:GITHUB_WORKSPACE\target\release"
|
||||
7z a oxipng.zip "Cargo.lock" "$OXIPNG_PATH\oxipng.exe" "C:\usr\local"
|
||||
- name: Upload binaries
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: oxipng-binaries
|
||||
path: oxipng.zip
|
||||
|
||||
deploy:
|
||||
needs: create-binaries
|
||||
env:
|
||||
FILENAME: oxipng-windows-sdk
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Download the zip
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: oxipng-binaries
|
||||
- name: Unzip oxipng Windows binaries
|
||||
run: |
|
||||
unzip oxipng-binaries/oxipng.zip -d oxipng-binaries
|
||||
mv oxipng-binaries/Cargo.lock .
|
||||
- name: Handle binaries
|
||||
run: |
|
||||
mv oxipng-binaries/local oxipng-binaries/$FILENAME
|
||||
strip oxipng-binaries/oxipng.exe
|
||||
- name: Package release binaries
|
||||
id: data
|
||||
run: |
|
||||
VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
|
||||
echo "::set-output name=version::$VERSION"
|
||||
cd oxipng-binaries
|
||||
zip -r oxipng-$VERSION-windows.zip $FILENAME
|
||||
$OXIPNG_PATH="$Env:GITHUB_WORKSPACE\target\release"
|
||||
7z a oxipng-v${{ steps.data.outputs.version }}-x86_64-pc-windows-msvc.zip "$OXIPNG_PATH\oxipng.exe"
|
||||
- name: Create a release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
name: v${{ steps.data.outputs.version }}
|
||||
files: |
|
||||
Cargo.lock
|
||||
oxipng-binaries/oxipng-${{ steps.data.outputs.version }}-windows.zip
|
||||
oxipng-binaries/oxipng.exe
|
||||
oxipng-v${{ steps.data.outputs.version }}-x86_64-pc-windows-msvc.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue