Skip to content

Commit

Permalink
ci: download csgobetterbots during release
Browse files Browse the repository at this point in the history
  • Loading branch information
lemonpole committed Dec 19, 2024
1 parent ddedd79 commit 5db256f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
publish:
runs-on: ubuntu-latest
env:
CSGO_BETTER_BOTS: csgo-better-bots
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
Expand All @@ -17,14 +18,16 @@ jobs:
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/
- run: npx -y conventional-changelog-cli -p conventionalcommits > CHANGELOG.md
- id: create_release
run: >
gh release create ${{ github.ref_name }}
--title "${{ github.ref_name }}"
--notes-file CHANGELOG.md
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

0 comments on commit 5db256f

Please sign in to comment.