Skip to content

dirk-peter-sag set a tag #22

dirk-peter-sag set a tag

dirk-peter-sag set a tag #22

Workflow file for this run

name: Create artifact (zip) on tag
run-name: ${{ github.actor }} set a tag
on:
push:
tags:
- "*"
# - 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "npm"
- run: npm ci
- run: echo "PACKAGE_JSON=$(jq -c . < package.json)" >> $GITHUB_ENV
# - run: npm lint
# - run: npm test
- run: npm run build
- run: echo "ARCHIVE_NAME=${{ fromJson(env.PACKAGE_JSON).name }}_${{ fromJson(env.PACKAGE_JSON).version }}.zip" >> $GITHUB_ENV
# obsolete with moving to 1020
# - name: Zip Build
# run: |
# cd ./dist/apps/${{ fromJson(env.PACKAGE_JSON).name }}
# zip -r ../../${{ env.ARCHIVE_NAME }} ./
# enable if you want to store an artifact of the build
# - name: Archive production artifacts
# uses: actions/upload-artifact@v4
# with:
# name: tag_archive
# path: dist/${{ env.ARCHIVE_NAME }}
# retention-days: 1
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/${{ env.ARCHIVE_NAME }}
asset_name: ${{ env.ARCHIVE_NAME }}
asset_content_type: application/zip