-
Notifications
You must be signed in to change notification settings - Fork 15
60 lines (57 loc) · 2.18 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Release
on:
release:
types:
- published
jobs:
build:
runs-on: ubuntu-latest
container: ghcr.io/sitkoru/actions-container
steps:
- uses: actions/checkout@v4
- name: Prepare
id: prep
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo ::set-output name=version::${VERSION}
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: |
src/Sitko.Core.Blazor.AntDesign/Web/package.json
- name: Build Sitko.Core.Blazor.AntDesign js
working-directory: src/Sitko.Core.Blazor.AntDesign/Web
shell: bash
run: |
npm ci
npm run prod
- name: Build
run: dotnet build -c Release /p:Version=${{ steps.prep.outputs.version }}
- name: Create packages
run: dotnet pack -c Release --no-build /p:Version=${{ steps.prep.outputs.version }} -p:PackageOutputPath=$(pwd)/packages
- name: Push to Github Packages
run: find packages -type f -name 'Sitko.Core.*.nupkg' -print0 | xargs -0 -n 10 -P 4 dotnet nuget push -s https://nuget.pkg.github.com/sitkoru/index.json --skip-duplicate --no-symbols -k ${GITHUB_TOKEN}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push to Nuget
run: find packages -type f -name 'Sitko.Core.*.nupkg' -print0 | xargs -0 -n 10 -P 4 dotnet nuget push -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
- name: Download Sitko.Core
uses: actions/checkout@v4
with:
repository: "sitkoru/Sitko.Core"
path: proto
ref: "proto"
token: ${{ secrets.BOT_TOKEN }}
- name: Publish proto archive
run: |
tar czf proto/proto.tar.gz -C src/Sitko.Core.Grpc/Proto .
echo echo ${{ steps.prep.outputs.version }}> proto/VERSION
cd proto
git config user.name ${{ secrets.BOT_NAME }}
git config user.email ${{ secrets.BOT_EMAIL }}
git add proto.tar.gz
git add VERSION
git commit -m "publish proto archive ${{ steps.prep.outputs.version }}"
git push