-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (55 loc) · 1.7 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
name: tag release
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/setup-node@v4
with:
node-version: 18
# - uses: oneteme/automation-scripts/.github/actions/sonar-npm-scan@main
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- uses: oneteme/automation-scripts/.github/actions/npm-project-version@main
id: prj_ver
outputs:
version: ${{ steps.prj_ver.outputs.version }}
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm install
- run: npm run build
- run: |
version=${{ needs.build.outputs.version }}
echo "minVer=${version%*.*}" >> $GITHUB_OUTPUT #major.minor
id: extract
- uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
#- uses: docker/setup-qemu-action@v3.2.0 #multiple architectures ARM, x86_64, etc.
#- uses: docker/setup-buildx-action@v3.8.0
- uses: docker/build-push-action@v6.10.0
with:
context: .
tags: "oneteme/${{ github.event.repository.name }}:${{ steps.extract.outputs.minVer }}"
push: true
release:
needs:
- build
- deploy
runs-on: ubuntu-latest
steps:
- uses: oneteme/automation-scripts/.github/actions/create-release-notes@main
with:
version: ${{ needs.build.outputs.version }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}