Download archives
This commit is contained in:
parent
fc16f7c272
commit
37ec9d7b75
|
|
@ -1,17 +1,14 @@
|
|||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: build
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target:
|
||||
- aarch64-pc-windows-msvc
|
||||
|
|
@ -79,3 +76,18 @@ jobs:
|
|||
with:
|
||||
name: ${{ env.ASSET }}
|
||||
path: ${{ env.ASSET }}
|
||||
release:
|
||||
# if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Download archives
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: artifact
|
||||
- name: Show downloaded files
|
||||
run: ls -lRh artifact/
|
||||
|
|
|
|||
|
|
@ -1,148 +0,0 @@
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- "aarch64-unknown-linux-gnu"
|
||||
- "aarch64-unknown-linux-musl"
|
||||
- "armv7-unknown-linux-gnueabihf"
|
||||
- "armv7-unknown-linux-musleabihf"
|
||||
- "x86_64-unknown-linux-gnu"
|
||||
- "x86_64-unknown-linux-musl"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
use-cross: true
|
||||
command: build
|
||||
args: --release --target ${{ matrix.target }}
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: "zoxide-${{ matrix.target }}"
|
||||
path: "target/${{ matrix.target }}/release/zoxide"
|
||||
|
||||
build-darwin:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --release --target x86_64-apple-darwin
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: "zoxide-x86_64-apple-darwin"
|
||||
path: "target/x86_64-apple-darwin/release/zoxide"
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --release --target x86_64-pc-windows-msvc
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: "zoxide-x86_64-pc-windows-msvc"
|
||||
path: "target/x86_64-pc-windows-msvc/release/zoxide.exe"
|
||||
|
||||
release-upload:
|
||||
needs:
|
||||
- build-linux
|
||||
- build-darwin
|
||||
- build-windows
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
|
||||
- uses: actions/download-artifact@v2
|
||||
|
||||
- name: Display structure of downloaded files
|
||||
run: ls -lR
|
||||
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: "zoxide-aarch64-unknown-linux-gnu/zoxide"
|
||||
asset_name: "zoxide-aarch64-unknown-linux-gnu"
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: "zoxide-aarch64-unknown-linux-musl/zoxide"
|
||||
asset_name: "zoxide-aarch64-unknown-linux-musl"
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: "zoxide-armv7-unknown-linux-gnueabihf/zoxide"
|
||||
asset_name: "zoxide-armv7-unknown-linux-gnueabihf"
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: "zoxide-armv7-unknown-linux-musleabihf/zoxide"
|
||||
asset_name: "zoxide-armv7-unknown-linux-musleabihf"
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: "zoxide-x86_64-unknown-linux-gnu/zoxide"
|
||||
asset_name: "zoxide-x86_64-unknown-linux-gnu"
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: "zoxide-x86_64-unknown-linux-musl/zoxide"
|
||||
asset_name: "zoxide-x86_64-unknown-linux-musl"
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: "zoxide-x86_64-apple-darwin/zoxide"
|
||||
asset_name: "zoxide-x86_64-apple-darwin"
|
||||
asset_content_type: application/octet-stream
|
||||
|
||||
- uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: "zoxide-x86_64-pc-windows-msvc/zoxide.exe"
|
||||
asset_name: "zoxide-x86_64-pc-windows-msvc.exe"
|
||||
asset_content_type: application/octet-stream
|
||||
Loading…
Reference in New Issue