-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (49 loc) · 1.4 KB
/
main.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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
container: ghcr.io/sitkoru/actions-container
env:
PROJECT: Sitko.Blazor.CKEditor
BUNDLE_PROJECT: Sitko.Blazor.CKEditor.Bundle
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Build bundle js
working-directory: src/${{ env.BUNDLE_PROJECT }}/Web
shell: bash
run: |
npm ci
npm run prod
- name: Create main package
run: dotnet pack -c Release src/${{ env.PROJECT}}
- name: Create bundle package
run: dotnet pack -c Release src/${{ env.BUNDLE_PROJECT}}
release:
name: Release
runs-on: ubuntu-latest
needs: [ build ]
if: ${{ github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Semantic Release
uses: sitkoru/semantic-release-action@v2
env:
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
GIT_AUTHOR_NAME: ${{ secrets.BOT_NAME }}
GIT_AUTHOR_EMAIL: ${{ secrets.BOT_EMAIL }}
GIT_COMMITTER_NAME: ${{ secrets.BOT_NAME }}
GIT_COMMITTER_EMAIL: ${{ secrets.BOT_EMAIL }}