Update build.yml #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
types: [ closed ] | |
name: Build Angular | |
jobs: | |
build: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [lts/*] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: npm install and npm run build | |
run: | | |
npm i | |
npm list | |
npm run build:prod | |
cd dist | |
mv ../.npmrc ngx-leaflet-locate | |
tar -czf release.tgz ngx-leaflet-locate/ | |
cd ngx-leaflet-locate | |
npm publish --access public | |
env: | |
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | |
- name: Push Build to Releases | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "dist/release.tgz" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: "2.0.7" | |