Merge pull request #47 from HSG-Library/develop #43
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: Create release package on push to main | |
on: | |
push: | |
branches: | |
- 'main' # Push to main branch creates release package | |
env: | |
PACKAGE_NAME: '41SLSP_HSG-HSGswisscovery' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16.x | |
- name: Build | |
run: | | |
cd .ci/ | |
npm ci | |
gulp -f gulpfile-ci.js create-package --view ${{ env.PACKAGE_NAME }} | |
- name: Set timezone | |
uses: szenius/[email protected] | |
with: | |
timezoneLinux: 'Europe/Zurich' | |
- name: Generate verison name | |
run: echo "VERSION=v$(date +'%Y.%m.%d-%H%M%S')" >> $GITHUB_ENV | |
- name: Create Release and upload artifact | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
automatic_release_tag: ${{ env.VERSION }} | |
prerelease: false | |
title: Release ${{ env.VERSION }} | |
files: ./.ci/${{ env.PACKAGE_NAME }}.zip |