Update package-lock (#573) #51
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: 'Release' | |
on: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
release: | |
name: 'Release' | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: Set time var | |
run: | | |
echo "time=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV | |
echo "ref=$(date +'%Y-%m-%dT%H-%M-%S')" >> $GITHUB_ENV | |
# Checks out a copy of your repository on the ubuntu-latest machine | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
# Make sure the actual branch is checked out when running on pull requests | |
ref: ${{ github.head_ref }} | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install modules | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Copy public | |
run: cp -r public flood-for-transmission | |
- name: Zip release | |
run: zip -r flood-for-transmission.zip flood-for-transmission | |
- name: Tar release | |
run: tar -czvf flood-for-transmission.tar.gz flood-for-transmission | |
- name: Release time based version | |
uses: 'marvinpinto/action-automatic-releases@latest' | |
with: | |
repo_token: '${{ secrets.GITHUB_TOKEN }}' | |
automatic_release_tag: '${{ env.ref }}' | |
prerelease: false | |
title: '${{ env.time }}' | |
files: | | |
flood-for-transmission.zip | |
flood-for-transmission.tar.gz | |
- name: Release latest | |
uses: 'marvinpinto/action-automatic-releases@latest' | |
with: | |
repo_token: '${{ secrets.GITHUB_TOKEN }}' | |
automatic_release_tag: 'latest' | |
prerelease: false | |
title: 'Latest' | |
files: | | |
flood-for-transmission.zip | |
flood-for-transmission.tar.gz |