Skip to content

11.42.0

11.42.0 #481

Workflow file for this run

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