Skip to content

ci: download csgobetterbots during release #23

ci: download csgobetterbots during release

ci: download csgobetterbots during release #23

Workflow file for this run

name: Publish
on:
push:
tags:
- v*
jobs:
publish:
runs-on: ubuntu-latest
env:
CSGO_BETTER_BOTS: csgo-better-bots
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- run: npm ci
- run: >
gh release download
--repo ${{ github.repository_owner }}/${{ env.CSGO_BETTER_BOTS }}
--pattern '*.zip'
- run: unzip -qq ${{ env.CSGO_BETTER_BOTS }}-*.zip
- run: cp -r ${{ env.CSGO_BETTER_BOTS }}/* config/csgo/
- run: echo "REPO_NAME=$(basename ${{ github.repository }})" >> $GITHUB_ENV
- run: mkdir $REPO_NAME && cp -r generated/* $REPO_NAME/ && cp -r config/* $REPO_NAME/
- run: zip -rq $REPO_NAME-${{ github.ref_name }}.zip $REPO_NAME/
- id: create_release
run: gh release create ${{ github.ref_name }} --title "${{ github.ref_name }}"
- if: success() && steps.create_release.outcome == 'success'
run: gh release upload ${{ github.ref_name }} $REPO_NAME-*.zip --clobber