ci(create-release): automatically bump fxmanifest version #11
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: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| create-release: | |
| 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: Get latest code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.repository.default_branch }} | |
| - name: Bump manifest version | |
| run: bun run .github/actions/bump-manifest-version.js | |
| env: | |
| TGT_RELEASE_VERSION: ${{ github.ref_name }} | |
| - name: Push version bump change | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| add: fxmanifest.lua | |
| push: true | |
| default_author: github_actions | |
| message: 'chore: bump version to ${{ github.ref_name }}' | |
| - name: Bundle files | |
| run: | | |
| mkdir -p ./temp/ac_radio | |
| cp ./{LICENSE,README.md,fxmanifest.lua,config.lua} ./temp/ac_radio | |
| cp -r ./{locales,modules,resource,web} ./temp/ac_radio | |
| cd ./temp && zip -r ../ac_radio.zip ./ac_radio | |
| - name: Create release | |
| uses: 'marvinpinto/action-automatic-releases@v1.2.1' | |
| with: | |
| repo_token: ${{ github.token }} | |
| prerelease: false | |
| files: ac_radio.zip | |
| - name: Update tag | |
| uses: EndBug/latest-tag@v1 | |
| with: | |
| ref: ${{ github.ref_name }} |