-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (87 loc) · 2.74 KB
/
template-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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Release
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [ created ]
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_2 }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NG_CLI_ANALYTICS: "ci"
GITHUB_API_URL: "https://api.github.com"
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - name: Set up JDK 17
# uses: actions/setup-java@v4
# with:
# java-version: '17'
# distribution: 'adopt'
# cache: maven
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
# - name: SetUp Angular CLI
# run: npm install -g @angular/cli
- name: Set up Elixir 1.14.3 and Otp 25
uses: erlef/setup-beam@v1
with:
elixir-version: '1.14.3'
otp-version: '25'
# - name: Build with Maven
# run: mvn -B package -DskipTests --file SpringBoot/Konex/pom.xml
# - name: Build with Angular
# run: |
# npm run ng analytics off --prefix Angular/Konex/
# npm install --prefix Angular/Konex/
# npm run build --prefix Angular/Konex/
# - name: Install zip package
# uses: montudor/action-zip@v1
# - name: Zip Angular dist
# run: zip -qq -r dist.zip konex-app
# working-directory: Angular/Konex/dist
- name: setup semantic-release
run: npm install -g semantic-release @semantic-release/exec @semantic-release/changelog @semantic-release/github -D
- name: release
run: npx -p @semantic-release/changelog -p @semantic-release/exec semantic-release
- name: Set variables
run: |
VER=$(cat VERSION-TAG.env)
echo "GITHUB_REF -> ${GITHUB_REF#refs/*/}"
echo "$VER"
echo "RELEASE_VERSION=$VER" >> $GITHUB_ENV
echo "RELEASE_VERSION -> ${{ env.RELEASE_VERSION }}"
- name: Restore dependencies cache
uses: actions/cache@v3
with:
path: Elixir/Konex/deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
working-directory: Elixir/Konex/
- name: Show files
run: |
ls
echo "------------------------------"
ls Elixir/Konex/
echo "------------------------------"
# - name: Install dependencies
# run: mix deps.get
# working-directory: Elixir/Konex/
# - name: Run tests
# run: mix test
# working-directory: Elixir/Konex/
# - name: Publish to HEX
# if: github.event_name == 'release'
# run: mix hex.publish --replace --yes
# env:
# HEX_API_KEY: ${{ secrets.HEX_API_KEY }}