Skip to content

Remove head sha of commit - in case new commits have come in #5

Remove head sha of commit - in case new commits have come in

Remove head sha of commit - in case new commits have come in #5

Workflow file for this run

# `dist/index.js` is a special file in Actions.
# When you reference an action with `uses:` in a workflow,
# `index.js` is the code that will run.
# For our project, we generate this file through a build process from other source files.
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
name: Update dist/
concurrency:
group: update-main
cancel-in-progress: false
on:
push:
branches:
- main
paths:
- 'src/**'
- 'package.json'
- 'yarn.lock'
- 'action.yml'
workflow_dispatch:
jobs:
check-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GIT_TOKEN }}
- name: Set Node.js 18.x
uses: actions/[email protected]
with:
node-version: 18.x
- name: Install dependencies
run: yarn
- name: Rebuild the dist/ directory
run: |
yarn build
yarn package
- name: commit to main
shell: bash
env:
CI_COMMIT_MESSAGE: 'feat: updated dist'
CI_COMMIT_AUTHOR: Continuous Integration
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "[email protected]"
git add .
git commit -m "${{env.CI_COMMIT_MESSAGE}}"
git push origin main