diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa19513..c0a7384 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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