-
Notifications
You must be signed in to change notification settings - Fork 15
81 lines (67 loc) · 2.16 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
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
# This is the workflow for pia-i18n
name: Build NPM
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [16.17.0]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install NPM
run: npm install
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: NPM angular CLI
run: npm install -g @angular/cli@15.2.10
- name: prepare to move
run: |
mkdir Move
mv ./[a-z]* ./Move
- name: get app
run: |
git clone https://github.com/LINCnil/pia.git
cd pia
git checkout upgrade-angular-version
npm i -f
# - name: prepare library
# run: |
# cd pia
# ng generate library pia-i18n
# rm -rf ./projects/pia-i18n/*
- name: go to Move folder, get files and move them to pia-i18n
run: |
mkdir ./pia/projects
mkdir ./pia/projects/pia-i18n
mv ./Move/[a-z]* ./pia/projects/pia-i18n
- name: return pia projet and build library
run: |
cd ./pia
rm -f ./projects/pia-i18n/src/lib/assets/i18n/cnil.babel
ng build pia-i18n
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: create tgz file
run: |
cd ./pia/dist/pia-i18n
npm pack --force
cd ../../
npm install ./dist/pia-i18n/atnos-pia-i18n-${{ steps.vars.outputs.tag }}.tgz --force
- name: publish library
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm config set scope "<@atnos>"
npm config list
npm publish ./pia/dist/pia-i18n/atnos-pia-i18n-${{ steps.vars.outputs.tag }}.tgz --access public
env:
CI: true
NODE_AUTH_TOKEN: ${{secrets.npm_token}}