This repository has been archived by the owner on Jan 13, 2025. It is now read-only.
Merge pull request #2 from SvampbobDev/main #6
Workflow file for this run
This file contains 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: Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
permissions: | |
contents: write | |
actions: write | |
jobs: | |
create-release: | |
name: Build and Create Tagged release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install archive tools | |
run: sudo apt install zip | |
- name: Checkout source code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.repository.default_branch }} | |
- name: Update version in fxmanifest.lua | |
run: | | |
sed -i "/^version /s/'[^']*'/'${{ github.ref_name }}'/" ./fxmanifest.lua | |
- name: Manifest version | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Update repository | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git add fxmanifest.lua | |
git commit -m "chore(fxmanifest): updated version tag to ${{ github.ref_name }}" | |
git push | |
- name: Bundle files | |
run: | | |
zip -r ${{ github.event.repository.name }}.zip . -x "./.git/*" "./.github/*" | |
- name: Create Release | |
uses: 'marvinpinto/[email protected]' | |
id: auto_release | |
with: | |
repo_token: '${{ secrets.GITHUB_TOKEN }}' | |
title: '${{ env.RELEASE_VERSION }}' | |
prerelease: false | |
files: ${{ github.event.repository.name }}.zip | |
env: | |
CI: false | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |