File tree Expand file tree Collapse file tree 5 files changed +135
-0
lines changed
Expand file tree Collapse file tree 5 files changed +135
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " 2. Continuous Deployment (Release Preview)"
2+
3+ on :
4+ push :
5+ tags :
6+ - " v[0-9]+\\ .[0-9]+\\ .[0-9]+-preview[0-9]+\\ .[0-9]+"
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+
12+ timeout-minutes : 15
13+
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+
18+ - name : Setup .NET
19+ uses : actions/setup-dotnet@v4
20+ with :
21+ dotnet-version : 8.0.x
22+
23+ - name : Set VERSION variable from tag
24+ run : echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
25+
26+ - name : Pack
27+ run : dotnet pack --configuration Release /p:Version=${VERSION} --output .
28+
29+ - name : Push
30+ run : dotnet nuget push CryptoNet.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_TOKEN}
31+ env :
32+ NUGET_TOKEN : ${{ secrets.NUGET_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : " 2. Continuous Deployment (Release)"
2+
3+ on :
4+ push :
5+ tags :
6+ - " v[0-9]+.[0-9]+.[0-9]+"
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+
12+ timeout-minutes : 15
13+
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Verify commit exists in origin/main
21+ run : git branch --remote --contains | grep origin/main
22+
23+ - name : Extract release notes
24+ run : |
25+ git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES
26+
27+ - name : Setup .NET
28+ uses : actions/setup-dotnet@v4
29+ with :
30+ dotnet-version : 8.0.x
31+
32+ - name : Set VERSION variable from tag
33+ run : echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
34+
35+ - name : Build
36+ run : dotnet build --configuration Release /p:Version=${VERSION}
37+
38+ - name : Test
39+ run : dotnet test --configuration Release /p:Version=${VERSION} --no-build
40+
41+ - name : Pack
42+ run : dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
43+
44+ - name : Push
45+ run : dotnet nuget push CryptoNet.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_TOKEN}
46+ env :
47+ NUGET_TOKEN : ${{ secrets.NUGET_TOKEN }}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1+ name : " 4. Deploy static content to Pages"
2+
3+ on :
4+ push :
5+ branches :
6+ - " main"
7+ workflow_dispatch :
8+
9+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+ permissions :
11+ contents : read
12+ pages : write
13+ id-token : write
14+
15+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+ concurrency :
18+ group : " pages"
19+ cancel-in-progress : false
20+
21+ jobs :
22+ deploy :
23+ runs-on : ubuntu-latest
24+
25+ environment :
26+ name : github-pages
27+ url : ${{ steps.deployment.outputs.page_url }}
28+
29+ steps :
30+ - name : Checkout
31+ uses : actions/checkout@v4
32+
33+ - name : Setup .NET
34+ uses : actions/setup-dotnet@v4
35+ with :
36+ dotnet-version : " 8.0.x"
37+
38+ - name : Install DocFX
39+ run : dotnet tool install -g docfx
40+
41+ - name : Build DocFX Documentation
42+ run : |
43+ docfx metadata
44+ docfx build docfx.json -o _site
45+
46+ - name : Setup Pages
47+ uses : actions/configure-pages@v5
48+
49+ - name : Upload artifact
50+ uses : actions/upload-pages-artifact@v3
51+ with :
52+ path : " ./_site"
53+
54+ - name : Deploy to GitHub Pages
55+ id : deployment
56+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments