File tree Expand file tree Collapse file tree 4 files changed +92
-5
lines changed
Expand file tree Collapse file tree 4 files changed +92
-5
lines changed Original file line number Diff line number Diff line change 1+ name : Create GitHub release
2+ on :
3+ push :
4+ tags : ['v*']
5+
6+ jobs :
7+ publish_binaries :
8+ name : Publish binaries
9+ runs-on : ubuntu-latest
10+ strategy :
11+ matrix :
12+ architecture :
13+ - win-x64
14+ - win-x86
15+ - linux-x64
16+ - osx-x64
17+ steps :
18+ - uses : actions/checkout@v2
19+ - name : Setup .NET
20+ uses : actions/setup-dotnet@v1
21+ with :
22+ dotnet-version : 5.0.x
23+ - name : Publish ${{ matrix.architecture }}
24+ run : dotnet publish ./src/kiota/kiota.csproj -c Release -p:PublishSingleFile=true -r ${{ matrix.architecture }} -o ./${{ matrix.architecture }}
25+ - name : Archive Release ${{ matrix.architecture }}
26+ uses : thedoctor0/zip-release@master
27+ with :
28+ filename : ' ./${{ matrix.architecture }}.zip'
29+ path : ' ./${{ matrix.architecture }}'
30+ - uses : actions/upload-artifact@v2
31+ with :
32+ name : binaries-${{ matrix.architecture }}
33+ path : ./${{ matrix.architecture }}.zip
34+ create_release :
35+ name : Create Release
36+ needs : [publish_binaries]
37+ environment :
38+ name : gh_releases
39+ runs-on : ubuntu-latest
40+ steps :
41+ - uses : actions/checkout@v2
42+ - uses : actions/download-artifact@v2
43+ with :
44+ path : output
45+ - name : Release
46+ uses : anton-yurchenko/git-release@v3.4.4
47+ env :
48+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49+ DRAFT_RELEASE : " false"
50+ PRE_RELEASE : " false"
51+ CHANGELOG_FILE : " CHANGELOG.md"
52+ ALLOW_EMPTY_CHANGELOG : " true"
53+ ALLOW_TAG_PREFIX : " true"
54+ with :
55+ args : |
56+ output/binaries-*/*.zip
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ name: Publish Docker image
22on :
33 push :
44 branches : [main]
5+ tags : ['v*']
56 paths : ['src/**', '.github/workflows/**']
67jobs :
78 push_to_registry :
1819 username : ${{ github.actor }}
1920 password : ${{ secrets.GITHUB_TOKEN }}
2021 registry : docker.pkg.github.com
21- - name : Push to GitHub Packages
22+ - run : |
23+ $version = $Env:BRANCH_NAME -replace "refs/tags/v",""
24+ echo "::set-output name=version::${version}"
25+ shell: pwsh
26+ id: getversion
27+ if: contains(github.ref, 'refs/tags/v')
28+ env:
29+ BRANCH_NAME: ${{ github.ref }}
30+ - name : Push to GitHub Packages - Nightly
31+ if : contains(github.ref, 'refs/head/main')
2232 uses : docker/build-push-action@v2
2333 with :
2434 push : true
25- tags : docker.pkg.github.com/microsoft/kiota/generator:latest
35+ tags : docker.pkg.github.com/microsoft/kiota/generator:nightly
36+ - name : Push to GitHub Packages - Release
37+ if : contains(github.ref, 'refs/tags/v')
38+ uses : docker/build-push-action@v2
39+ with :
40+ push : true
41+ tags : docker.pkg.github.com/microsoft/kiota/generator:latest,docker.pkg.github.com/microsoft/kiota/generator:${{ steps.getversion.outputs.version }}
Original file line number Diff line number Diff line change 1+ # Changelog
2+
3+ All notable changes to this project will be documented in this file.
4+
5+ The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6+ and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7+
8+ ## [ Unreleased]
9+
10+ ## [ 0.0.1] - 2021-04-20
11+
12+ ### Added
13+
14+ - Initial GitHub release
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env
22WORKDIR /app
33
44COPY ./src ./kiota/src
5- COPY ./tests ./kiota/tests
6- COPY ./kiota.sln ./kiota
75WORKDIR /app/kiota
86RUN dotnet publish ./src/kiota/kiota.csproj -c Release
97
@@ -14,4 +12,7 @@ COPY --from=build-env /app/kiota/src/kiota/bin/Release/net5.0 ./
1412
1513VOLUME /app/output
1614VOLUME /app/openapi.yml
17- ENTRYPOINT ["dotnet" , "kiota.dll" ]
15+ ENTRYPOINT ["dotnet" , "kiota.dll" ]
16+ LABEL description="# Welcome to Kiota Generator \
17+ To start generating SDKs checkout [the getting started documentation](https://github.com/microsoft/kiota/#running-kiota-with-docker) \
18+ [Source dockerfile](https://github.com/microsoft/kiota/blob/main/releases/Dockerfile)"
You can’t perform that action at this time.
0 commit comments