-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (51 loc) · 2.43 KB
/
tchap_create_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
name: Build archives and create release for tchap-web on tag "tchap-"
on:
push:
tags:
- "tchap-*"
jobs:
build-archive:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
#Build artifacts for dev, preprod and prod
- uses: actions/checkout@v3
- name: Get Node Version
id: node_version
run: echo ::set-output name=node_version::$(node -e 'console.log(require("./package.json").engines.node)')
- name: Use Node.js ${{ steps.node_version.outputs.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node_version.outputs.node_version }}
- name: Install Dependencies
run: "yarn install"
- name: Get Tchap Web Version
id: version
run: echo ::set-output name=version::$(node -e 'console.log(require("./package.json").version)')
- name: Build the archive ${{ steps.version.outputs.version }} for dev
run: scripts/tchap/package-tchap.sh
env:
CONFIG: dev
- name: Build the archive ${{ steps.version.outputs.version }} for preprod
run: scripts/tchap/package-tchap.sh
env:
CONFIG: preprod
- name: Build the archive ${{ steps.version.outputs.version }} for prod
run: scripts/tchap/package-tchap.sh
env:
CONFIG: prod
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d')"
#create release
- name: Create tchap-web release
uses: ncipollo/release-action@v1
with:
tag: "tchap-${{ steps.version.outputs.version }}"
generateReleaseNotes: true
artifacts: >
/home/runner/work/tchap-web-v4/tchap-web-v4/tchap-${{ steps.version.outputs.version }}-dev-${{ steps.date.outputs.date }}.tar.gz,
/home/runner/work/tchap-web-v4/tchap-web-v4/tchap-${{ steps.version.outputs.version }}-preprod-${{ steps.date.outputs.date }}.tar.gz,
/home/runner/work/tchap-web-v4/tchap-web-v4/tchap-${{ steps.version.outputs.version }}-prod-${{ steps.date.outputs.date }}.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}