Add readme to build process #16
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: run-build | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-all: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: npm ic | |
- name: Run build | |
run: | | |
mkdir dist | |
npm run build | |
npm run build:csgo | |
- name: Copy files to dist | |
run: cp LICENSE README.md dist | |
- name: Configure git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
git fetch --all | |
git checkout --track origin/build | |
- name: Copy dist to root | |
run: cp -rf ./dist/* ./ | |
- name: Commit files | |
run: | | |
git add *.d.ts | |
git add README.md | |
git add LICENSE | |
git push | |
git commit -m "Automated build on ${{ github.ref }}" | |
git push origin build |