From 3dababa83c1586191e3c742bc966630ccd26996a Mon Sep 17 00:00:00 2001 From: Isak W Date: Sun, 2 Oct 2022 13:37:57 +0200 Subject: [PATCH] Upload artifacts on tagging --- .github/workflows/cd.yml | 53 +++++++++++++++++++++++++++++++++++++++- xpanda-cli/Cargo.toml | 5 ++-- xpanda/Cargo.toml | 9 +++++++ 3 files changed, 64 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ef59f04..7e9c3fa 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -6,6 +6,57 @@ on: - "v*" jobs: + release: + name: Create release + runs-on: ubuntu-latest + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} + steps: + - id: create_release + name: Create release + uses: actions/create-release@v1 + with: + draft: false + prerelease: false + release_name: ${{ github.ref }} + tag_name: ${{ github.ref }} + env: + GITHUB_TOKEN: ${{ github.token }} + upload-artifact: + name: Upload ${{ matrix.target }} artifact + runs-on: ${{ matrix.os }} + needs: release + strategy: + matrix: + include: + - os: windows-latest + target: x86_64-pc-windows-msvc + path: ./target/release/xpanda-cli.exe + name: xpanda.exe + - os: ubuntu-latest + target: x86_64-unknown-linux-gnu + path: ./target/release/xpanda-cli + name: xpanda + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: Build project + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --target ${{ matrix.target }} + - name: Upload artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ needs.release.outputs.upload_url }} + asset_path: ${{ matrix.path }} + asset_name: ${{ matrix.name }} publish: name: Publish runs-on: ubuntu-latest @@ -20,4 +71,4 @@ jobs: uses: actions-rs/cargo@v1 with: command: publish - args: --verbose --all-features --token ${{ secrets.CARGO_TOKEN }} + args: --package xpanda --all-features --token ${{ secrets.CARGO_TOKEN }} diff --git a/xpanda-cli/Cargo.toml b/xpanda-cli/Cargo.toml index 1b0d535..0b0f368 100644 --- a/xpanda-cli/Cargo.toml +++ b/xpanda-cli/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "xpanda-cli" -description = "Unix shell-like parameter expansion/variable substitution" +description = "Command line interface for Unix shell-like parameter expansion/variable substitution" authors = ["Isak Wertwein "] homepage = "https://github.com/aesy/xpanda" -license-file = "LICENSE" +repository = "https://github.com/aesy/xpanda" +license-file = "../LICENSE" version = "0.1.0" edition = "2021" diff --git a/xpanda/Cargo.toml b/xpanda/Cargo.toml index d110243..4a073b6 100644 --- a/xpanda/Cargo.toml +++ b/xpanda/Cargo.toml @@ -1,5 +1,14 @@ [package] name = "xpanda" +description = "Unix shell-like parameter expansion/variable substitution" +authors = ["Isak Wertwein "] +homepage = "https://github.com/aesy/xpanda" +repository = "https://github.com/aesy/xpanda" +documentation = "https://docs.rs/xpanda" +readme = "README.md" +license-file = "../LICENSE" +categories = ["command-line-utilities", "template-engine", "text-processing"] +keywords = ["environment", "variable", "substitutaion", "parameter", "expansion"] version = "0.1.0" edition = "2021"