Skip to content

Commit

Permalink
🐛 Use github ref as version for packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
FeatCrush committed Oct 11, 2022
1 parent d5eaec1 commit 047cfdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,15 @@ on:
- '*'

jobs:
format-version:
name: Format versions
runs-on: [self-hosted, python]
outputs:
lib-version-formated: ${{ steps.format-lib-version.outputs.lib-version }}
steps:
- name: "Format lib version"
id: format-lib-version
run: echo "::set-output name=lib-version::$(sed 's/^[^\/]*\///' <<< ${{github.ref_name}} )"

smartway-caoc:
needs: format-version
uses: ./.github/workflows/smartway-caoc-publish.yml
with:
lib-version: ${{needs.format-version.outputs.lib-version-formated}}.${{ github.run_number }}
lib-version: ${{github.ref_name}}
configuration: Release
secrets: inherit

notify:
if: ${{ success() }}
needs: [format-version, smartway-caoc]
needs: [smartway-caoc]
uses: ./.github/workflows/notify.yml
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/smartway-caoc-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: msbuild Cat.Ereza.Customactivityoncrash.sln -p:Configuration=${{ inputs.configuration }} -clp:Summary

- name: Package the lib
run: nuget pack Cat.Ereza.Customactivityoncrash/Cat.Ereza.Customactivityoncrash.csproj -properties Configuration=${{ inputs.configuration }}
run: nuget pack Cat.Ereza.Customactivityoncrash/Cat.Ereza.Customactivityoncrash.csproj -properties Configuration=${{ inputs.configuration }} -Version ${{ inputs.lib-version }}

- name: Publish the lib
run: nuget push *.nupkg -ApiKey ${{ secrets.NUGET_API_KEY }} -Source https://api.nuget.org/v3/index.json -SkipDuplicate
Expand Down

0 comments on commit 047cfdf

Please sign in to comment.