Release loopgyou #199
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 loopgyou | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: "gyou" | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Build | |
run: | | |
yarn install | |
echo "export const lastCommitHash: string | undefined = \"$(git rev-parse --short HEAD)\";" > src/_git_commit.ts | |
yarn run build | |
git checkout src/_git_commit.ts | |
git checkout yarn.lock | |
- run: | | |
git config user.name "Build Script" | |
git config user.email "<>" | |
git fetch --all | |
SHA=$(git rev-parse --short HEAD) | |
git switch release | |
rm -rf scripts/ | |
rm -rf ccs/ | |
rm -rf relay/ | |
mv KoLmafia/* ./ | |
rm -rf KoLmafia | |
git add scripts/ | |
git add relay/ | |
git commit -m "Build Mafia files for commit $SHA" | |
git push origin release |