chore: bump version to v1.5.7 #12
Workflow file for this run
This file contains hidden or 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: Create release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| create-release: | |
| if: github.actor_id != 210085057 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install zip | |
| run: sudo apt install zip | |
| - name: Install Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Generate GitHub App token | |
| id: app_token | |
| uses: tibdex/github-app-token@v2 | |
| with: | |
| app_id: ${{ secrets.APP_ID }} | |
| private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - name: Get latest code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.repository.default_branch }} | |
| token: ${{ steps.app_token.outputs.token }} | |
| - name: Bump package version | |
| run: bun run .github/actions/bump-package-version.js | |
| env: | |
| TGT_RELEASE_VERSION: ${{ github.ref_name }} | |
| - name: Push version bump change | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| add: package.json | |
| push: true | |
| default_author: github_actions | |
| message: 'chore: bump version to ${{ github.ref_name }}' | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run build script | |
| run: bun run build | |
| - name: Bundle files | |
| run: | | |
| mkdir -p ./temp/ox_core/common | |
| cp ./{LICENSE,README.md,fxmanifest.lua} ./temp/ox_core | |
| cp -r ./{lib,locales,sql,dist} ./temp/ox_core | |
| cp -r ./common/data ./temp/ox_core/common/data | |
| cd ./temp && zip -r ../ox_core.zip ./ox_core | |
| - name: Create release | |
| uses: 'marvinpinto/action-automatic-releases@v1.2.1' | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| prerelease: false | |
| files: ox_core.zip | |
| - name: Update tag | |
| uses: EndBug/latest-tag@v1 | |
| with: | |
| ref: ${{ github.ref_name }} | |
| - name: Publish package to npm registry | |
| run: bun publish --access public | |
| env: | |
| NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }} |