Skip to content

Update node version to 20 in GitHub Action (#11) #14

Update node version to 20 in GitHub Action (#11)

Update node version to 20 in GitHub Action (#11) #14

Workflow file for this run

name: Build script and update dist on script sources update on master
on:
push:
branches:
- master
paths:
- 'action.sh'
- 'action.yml'
- 'index.js'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Pull source code
uses: actions/checkout@v2
with:
path: './'
- name: Clean npm cache directory
run: npm cache clear --force
- name: Detect npm cache location
id: npm-cache
run: echo "::set-output name=dir::$(npm config get cache)"
- name: Set up workflow caching of npm cache
uses: actions/cache@v1
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-cache-
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Setup git creds
uses: oleksiyrudenko/gha-git-credentials@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit update and tag with rc (forcedly)
run: |
git commit -m "Update dist/*" -a
git tag -f rc
- name: Publish changes
run: |
git push
git push -f origin rc