Skip to content

Commit

Permalink
Update simple-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Gellipapa authored Jan 25, 2024
1 parent 82ba901 commit 5ad84ee
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/simple-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
type: string
description: If the value is true then it builds web files, if not then it is a simple release.
required: false
neededNewBranch:
type: string
description: Specify true or false if you want to create a new branch.
required: false
jobs:
create-release:
name: Build and Create Tagged release
Expand All @@ -38,7 +42,7 @@ jobs:
run: sudo apt install zip

- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
Expand All @@ -47,13 +51,13 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 17
node-version: 20

- name: Setup node with dependency path
if: ${{ env.WEB }}
uses: actions/setup-node@v3
with:
node-version: 17
node-version: 20
cache: 'npm'
cache-dependency-path: web/package-lock.json

Expand All @@ -74,16 +78,19 @@ jobs:
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: 1.0.0

- name: Get next minor version
id: semvers
uses: "WyriHaximus/github-action-next-semvers@v1"
with:
version: ${{ steps.previoustag.outputs.tag }}

- name: Create new milestone
id: createmilestone
uses: "WyriHaximus/github-action-create-milestone@v1"
with:
title: ${{ steps.semvers.outputs.patch }}

- name: Set Release Version
id: set_version
run: |
Expand All @@ -92,18 +99,28 @@ jobs:
else
echo "DETERMINED_VERSION=${{ steps.semvers.outputs.patch }}" >> $GITHUB_ENV
fi
- name: Set needed new branch
run: |
if [ "${{ inputs.neededNewBranch }}" = "true" ]; then
echo "NEW_BRANCH_NEEDED=new-release-${{ env.DETERMINED_VERSION }}" >> $GITHUB_ENV
else
echo "NEW_BRANCH_NEEDED=" >> $GITHUB_ENV
fi
- name: 'Download Bump manifest version js file and run in node'
run: curl -f https://raw.githubusercontent.com/esx-framework/.github/main/.github/actions/bump-manifest-version.js | node -
env:
TGT_RELEASE_VERSION: ${{ env.DETERMINED_VERSION }}
- name: Push manifest change
uses: EndBug/add-and-commit@v8
with:
add: fxmanifest.lua
add: ${{ env.FXMANIFEST_FILE_CHANGES }}
push: true
author_name: Manifest Bumper
author_email: 41898282+github-actions[bot]@users.noreply.github.com
message: 'chore: bump manifest version to ${{ env.DETERMINED_VERSION }}'
new_branch: ${{ env.NEW_BRANCH_NEEDED }}

- name: Update tag ref
uses: EndBug/latest-tag@latest
Expand Down

0 comments on commit 5ad84ee

Please sign in to comment.