Skip to content

Angular 18

Angular 18 #18

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Publish to npm
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
release:
types:
- published
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
- name: Read release version
id: version
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
echo "release_version=${VERSION}" >> $GITHUB_OUTPUT
- name: Version Module
run: |
echo "Release Version: ${{ steps.version.outputs.release_version }}" >> $GITHUB_STEP_SUMMARY
cat projects/ion-range-calendar/package.json | jq ".version=\"${{ steps.version.outputs.release_version }}\"" > projects/ion-range-calendar/package.json.new
mv projects/ion-range-calendar/package.json.new projects/ion-range-calendar/package.json
- name: Install Angular CLI
run: npm i -g @angular/cli
- name: Install Packages
run: npm i
- name: Build
run: npm run build:prod
- name: publish
run: npm run publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}