Skip to content

Commit

Permalink
#49 fix version generation
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicGD committed Sep 22, 2020
1 parent f8c0560 commit f288eee
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ jobs:
build:
runs-on: ubuntu-latest
container: mcr.microsoft.com/dotnet/sdk:5.0
env:
VERSION: ${{ github.ref#refs/tags/ }}
steps:
- uses: actions/checkout@v2
- name: Prepare
id: prep
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo ::set-output name=version::${VERSION}
- name: Restore
run: dotnet restore --locked-mode
- name: Create packages
run: dotnet pack --no-restore -c Release /p:Version=$VERSION -o $(pwd)/packages
run: dotnet pack --no-restore -c Release /p:Version=${{ steps.prep.outputs.version }} -o $(pwd)/packages
- name: Push to Nuget
run: find $(pwd)/packages -name *.nupkg -exec dotnet nuget push {} -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} \;
- name: Download Sitko.Core
Expand All @@ -29,12 +32,12 @@ jobs:
if: github.ref == 'refs/heads/master'
run: |
tar czf proto/proto.tar.gz -C src/Sitko.Core.Grpc/Proto .
echo echo $VERSION > proto/VERSION
echo echo ${{ steps.prep.outputs.version }} > proto/VERSION
cd proto
git config user.name sitkobot
git config user.email [email protected]
git add proto.tar.gz
git add VERSION
git commit -m "publish proto archive $VERSION"
git commit -m "publish proto archive ${{ steps.prep.outputs.version }}"
git push

0 comments on commit f288eee

Please sign in to comment.