2020-03-05 15:34:06 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*" # push events to matching v*, i.e. v1.0, v20.15.10
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-linux:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-03-18 06:52:57 +00:00
|
|
|
target: ["x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl", "armv7-unknown-linux-musleabihf"]
|
2020-03-05 15:34:06 +00:00
|
|
|
steps:
|
2020-07-03 18:07:36 +00:00
|
|
|
- uses: actions/checkout@v2
|
2020-03-05 15:34:06 +00:00
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
use-cross: true
|
|
|
|
command: build
|
|
|
|
args: --release --target ${{ matrix.target }}
|
2020-07-03 18:07:36 +00:00
|
|
|
- uses: actions/upload-artifact@v2
|
2020-03-05 15:34:06 +00:00
|
|
|
with:
|
|
|
|
name: "zoxide-${{ matrix.target }}"
|
|
|
|
path: "target/${{ matrix.target }}/release/zoxide"
|
|
|
|
|
|
|
|
build-darwin:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
2020-07-03 18:07:36 +00:00
|
|
|
- uses: actions/checkout@v2
|
2020-03-05 15:34:06 +00:00
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --release --target x86_64-apple-darwin
|
2020-07-03 18:07:36 +00:00
|
|
|
- uses: actions/upload-artifact@v2
|
2020-03-05 15:34:06 +00:00
|
|
|
with:
|
|
|
|
name: "zoxide-x86_64-apple-darwin"
|
|
|
|
path: "target/x86_64-apple-darwin/release/zoxide"
|
|
|
|
|
2020-06-13 13:35:54 +00:00
|
|
|
build-windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2020-07-03 18:07:36 +00:00
|
|
|
- uses: actions/checkout@v2
|
2020-06-13 13:35:54 +00:00
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --release --target x86_64-pc-windows-msvc
|
2020-07-03 18:07:36 +00:00
|
|
|
- uses: actions/upload-artifact@v2
|
2020-06-13 13:35:54 +00:00
|
|
|
with:
|
2020-07-03 18:07:36 +00:00
|
|
|
name: "zoxide-x86_64-pc-windows-msvc"
|
2020-06-13 13:35:54 +00:00
|
|
|
path: "target/x86_64-pc-windows-msvc/release/zoxide.exe"
|
|
|
|
|
2020-03-05 15:34:06 +00:00
|
|
|
release-upload:
|
|
|
|
needs:
|
|
|
|
- build-linux
|
|
|
|
- build-darwin
|
2020-06-13 13:35:54 +00:00
|
|
|
- build-windows
|
2020-03-05 15:34:06 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-07-03 18:07:36 +00:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2020-03-05 15:34:06 +00:00
|
|
|
- id: create_release
|
2020-07-03 18:07:36 +00:00
|
|
|
uses: actions/create-release@v1
|
2020-03-05 15:34:06 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref }}
|
2021-03-29 15:44:30 +00:00
|
|
|
release_name: ${{ github.ref }}
|
2020-03-05 15:34:06 +00:00
|
|
|
|
2020-07-03 18:07:36 +00:00
|
|
|
- uses: actions/download-artifact@v2
|
|
|
|
|
|
|
|
- name: Display structure of downloaded files
|
|
|
|
run: ls -lR
|
|
|
|
|
2020-03-05 15:34:06 +00:00
|
|
|
- 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
|
|
|
|
|
2020-03-18 06:52:57 +00:00
|
|
|
- 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
|
|
|
|
|
2020-03-05 15:34:06 +00:00
|
|
|
- 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
|
2020-06-13 13:35:54 +00:00
|
|
|
|
|
|
|
- uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
2020-07-03 18:07:36 +00:00
|
|
|
asset_path: "zoxide-x86_64-pc-windows-msvc/zoxide.exe"
|
2020-06-13 13:35:54 +00:00
|
|
|
asset_name: "zoxide-x86_64-pc-windows-msvc.exe"
|
|
|
|
asset_content_type: application/octet-stream
|