-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||