fix(template): add second level calendario_eventi and minor fix #146
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
name: Build Release | |
on: | |
push: | |
tags: | |
- '*' | |
# - '/^\d+\.\d+\.\d+(-\w+)?$/' | |
jobs: | |
build: | |
name: Upload Release Asset | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
node-version: [ 20.x ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Fixup git permissions | |
# https://github.com/actions/checkout/issues/766 | |
shell: bash | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: git config | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
- name: Build Project | |
run: | | |
npm install | |
npm run build:prod | |
- name: Clean package | |
run: | | |
rm -rf .git .github node_modules .gitignore | |
- name: Get current date | |
id: date | |
run: | | |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | |
echo "datestamp=$(date +'%s')" >> $GITHUB_OUTPUT | |
- name: Versioning | |
uses: "DamianReeves/write-file-action@master" | |
with: | |
path: skenografia.info.yml | |
write-mode: append | |
contents: | | |
# Information added by Github Action packaging script on ${{ steps.date.outputs.date }} | |
version: '${{ github.ref_name }}' | |
project: 'skenografia' | |
datestamp: ${{ steps.date.outputs.datestamp }} | |
- name: Compress Dist Folder | |
run: zip -r skenografia.zip ./dist | |
- name: Set Package Version | |
run: | | |
npm version ${{ github.ref_name }} | |
- name: NPM registry | |
run: | | |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
npm config set registry https://registry.npmjs.org/ | |
- name: Publish package to NPM | |
run: npm publish --access=public | |
continue-on-error: true | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: rm ~/.npmrc | |
- name: Create Package dist | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifactErrorsFailBuild: true | |
artifacts: skenografia.zip |