ci(create-release): restructure and update versions #4
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: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get latest code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.repository.default_branch }} | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install | |
working-directory: web | |
- name: Run build script | |
run: bun run build | |
working-directory: web | |
- name: Bump manifest version | |
run: bun .github/actions/bump-manifest-version.js | |
env: | |
TGT_RELEASE_VERSION: ${{ github.ref_name }} | |
- name: Push manifest change | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: fxmanifest.lua | |
push: true | |
default_author: github_actions | |
message: 'chore: bump manifest version to ${{ github.ref_name }}' | |
- name: Update tag | |
uses: EndBug/latest-tag@v1 | |
with: | |
ref: ${{ github.ref_name }} | |
- name: Install zip | |
run: sudo apt install zip | |
- name: Bundle files | |
run: | | |
mkdir -p ./temp/ox_doorlock | |
mkdir -p ./temp/ox_doorlock/web/ | |
mkdir -p ./temp/ox_doorlock/convert/ | |
cp ./{LICENSE,README.md,fxmanifest.lua,config.lua,types.lua} ./temp/ox_doorlock | |
cp -r ./{client,server,sql,locales,audio} ./temp/ox_doorlock | |
cp -r ./web/build ./temp/ox_doorlock/web/ | |
cd ./temp && zip -r ../ox_doorlock.zip ./ox_doorlock | |
- name: Create release | |
uses: 'marvinpinto/action-automatic-releases@v1.2.1' | |
id: auto_release | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
title: ${{ env.RELEASE_VERSION }} | |
prerelease: false | |
files: ox_doorlock.zip | |
env: | |
CI: false | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |