Merge pull request #77 from MADE-Apps/dependabot/npm_and_yarn/made-vu… #19
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
name: made-vue-chipbox | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
paths: | |
- made-vue-chipbox/** | |
- build/** | |
- .github/workflows/made-vue-chipbox.yml | |
pull_request: | |
branches: | |
- main | |
paths: | |
- made-vue-chipbox/** | |
- build/** | |
- .github/workflows/made-vue-chipbox.yml | |
workflow_dispatch: | |
defaults: | |
run: | |
working-directory: made-vue-chipbox | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get source | |
uses: actions/checkout@v2 | |
- name: Get Build Version | |
run: | | |
Import-Module ..\build\GetBuildVersion.psm1 | |
$version = GetBuildVersion -VersionString $Env:GITHUB_REF | |
echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
Write-Host $version | |
shell: pwsh | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Restore dependencies | |
run: npm install | |
- name: Update Version | |
run: npm version $BUILD_VERSION --no-git-tag-version --allow-same-version | |
- name: Build | |
run: npm run build | |
- name: Copy package.json to dist | |
run: cp "package.json" "./dist/package.json" | |
- name: Copy README.md to dist | |
run: cp "README.md" "./dist/README.md" | |
- name: Publish | |
if: startsWith(github.ref, 'refs/tags/v') | |
working-directory: made-vue-chipbox/dist | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |