Skip to content

Commit

Permalink
ci: More publisher fixups
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Mar 15, 2024
1 parent 25608dd commit 8e933e1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/publish-libosdp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ name: Publish libosdp

on:
workflow_dispatch:
inputs:
tag:
description: 'Tag'
required: true
push:
# Sequence of patterns matched against refs/tags
tags:
Expand All @@ -16,7 +20,7 @@ on:

jobs:
cross_platform_check:
name: Build libosdp on ${{ matrix.os }}
name: Build crate on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -30,7 +34,17 @@ jobs:
with:
toolchain: stable
override: true
- run: cargo build -p libosdp-sys
- name: "Setup environment - trigger"
if: github.ref == 'refs/heads/master'
run: echo "TAG=${TRIGGER_TAG}" >> "${GITHUB_ENV}"
env:
TRIGGER_TAG: ${{ github.event.inputs.tag }}
- name: "Setup environment - tag"
if: github.ref != 'refs/heads/master'
run: echo "TAG=${REL_TAG}" >> "${GITHUB_ENV}"
env:
REL_TAG: ${{ github.ref_name }}
- run: cargo build -p $(echo ${TAG} | perl -pe 's/([a-z\-]+)-v.*/\1/')

publish:
name: Publish Crate
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-osdpctl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

jobs:
publish:
name: Publish Crate
name: Publish Crate - osdpctl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 8e933e1

Please sign in to comment.