Skip to content

Commit

Permalink
Upload artifacts on tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
aesy committed Oct 2, 2022
1 parent 5de7d1d commit 3dababa
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 3 deletions.
53 changes: 52 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
5 changes: 3 additions & 2 deletions xpanda-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
homepage = "https://github.com/aesy/xpanda"
license-file = "LICENSE"
repository = "https://github.com/aesy/xpanda"
license-file = "../LICENSE"
version = "0.1.0"
edition = "2021"

Expand Down
9 changes: 9 additions & 0 deletions xpanda/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
[package]
name = "xpanda"
description = "Unix shell-like parameter expansion/variable substitution"
authors = ["Isak Wertwein <[email protected]>"]
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"

Expand Down

0 comments on commit 3dababa

Please sign in to comment.