Skip to content

Merge pull request #52 from LINCnil/deps/update-tag-version #36

Merge pull request #52 from LINCnil/deps/update-tag-version

Merge pull request #52 from LINCnil/deps/update-tag-version #36

Workflow file for this run

# 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}}