Skip to content

Generating v1.1.0 release by @pedropapa #20

Generating v1.1.0 release by @pedropapa

Generating v1.1.0 release by @pedropapa #20

Workflow file for this run

name: brz-fishing-release
run-name: Generating ${{ github.ref_name }} release by @${{ github.actor }}
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
ref_name:
description: "Release name"
required: true
default: "v1.0.0"
permissions:
contents: write
env:
working_path: ./
fivemNodeVersion: 16.9.1
ref_name_or_input: ${{ github.event.inputs.ref_name || github.ref_name }}
jobs:
build:
name: Generate release
runs-on: ubuntu-latest
steps:
- name: Generate release file name
run: |
export RELEASE_NAME=$(echo ${{ env.ref_name_or_input }} | sed 's/\./-/g')
echo releaseName=brz-fishing-$RELEASE_NAME >> $GITHUB_ENV
echo releasePath="brz-fishing-$RELEASE_NAME.zip" >> $GITHUB_ENV
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: ${{ env.fivemNodeVersion }}
- run: yarn
working-directory: ${{ env.working_path }}
- name: Build project
run: yarn build
working-directory: ${{ env.working_path }}
- name: Generate release asset
run: |
zip -r ${{ env.releaseName }}.zip ./ -i \
./fxmanifest.lua \
'/nui/dist/*' \
'/nui/*.html' \
'/dist/*' \
'/installation/*' \
./package.json \
./README.md \
./CHANGELOG.md \
./INSTALLING.md \
./settings.js \
./yarn.lock \
./LICENSE
working-directory: ${{ env.working_path }}
- name: Upload release asset
id: upload-release-asset
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: true
tag_name: ${{ env.ref_name_or_input }}
files: ./${{ env.releasePath }}