Skip to content

Update to upload-artifacts@v4 #54

Update to upload-artifacts@v4

Update to upload-artifacts@v4 #54

Workflow file for this run

name: Release
on:
push:
tags: ["*"]
workflow_dispatch:
jobs:
create_release:
name: Create Release
runs-on: ubuntu-20.04
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Moonwave ${{ github.ref }}
draft: false
prerelease: true
windows:
needs: create_release
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Build release binary
working-directory: ./extractor
run: cargo build --verbose --locked --release
- name: Zip up binary
shell: powershell
working-directory: extractor/target/release/
run: Compress-Archive moonwave-extractor.exe $env:GITHUB_WORKSPACE/release.zip
- name: Get Tag Version
env:
github_ref: ${{ github.ref }}
shell: bash
run: |
echo "REF=${github_ref/refs\/tags\//}" >> $GITHUB_ENV
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: release.zip
asset_name: moonwave-extractor-${{ env.REF }}-win64.zip
asset_content_type: application/octet-stream
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: moonwave-extractor-${{ env.REF }}-win64
path: extractor/target/release/moonwave-extractor.exe
macos:
needs: create_release
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Install Rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Build release binary
working-directory: ./extractor
run: |
source $HOME/.cargo/env
cargo build --verbose --locked --release
env:
OPENSSL_STATIC: 1
- name: Zip up binary
shell: bash
working-directory: extractor/target/release/
run: zip $GITHUB_WORKSPACE/release.zip moonwave-extractor
- name: Get Tag Version
env:
github_ref: ${{ github.ref }}
run: |
echo "REF=${github_ref/refs\/tags\//}" >> $GITHUB_ENV
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: release.zip
asset_name: moonwave-extractor-${{ env.REF }}-macos.zip
asset_content_type: application/octet-stream
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: moonwave-extractor-${{ env.REF }}-macos
path: extractor/target/release/moonwave-extractor
linux:
needs: create_release
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Build
working-directory: ./extractor
run: cargo build --locked --verbose --release
env:
OPENSSL_STATIC: 1
- name: Zip up binary
shell: bash
working-directory: extractor/target/release/
run: zip $GITHUB_WORKSPACE/release.zip moonwave-extractor
- name: Get Tag Version
env:
github_ref: ${{ github.ref }}
run: |
echo "REF=${github_ref/refs\/tags\//}" >> $GITHUB_ENV
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: release.zip
asset_name: moonwave-extractor-${{ env.REF }}-linux.zip
asset_content_type: application/octet-stream
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: moonwave-extractor-${{ env.REF }}-linux
path: extractor/target/release/moonwave-extractor