-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/NoMercy-Entertainment/NoM…
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Step 1: Check out the code | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
# Step 2: Set up Node.js | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' # Use the latest LTS version of Node.js | ||
|
||
# Step 3: Read the version from package.json | ||
- name: Get version from package.json | ||
id: get_version | ||
run: | | ||
PACKAGE_VERSION=$(node -p "require('./package.json').version") | ||
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> $GITHUB_ENV | ||
# Step 4: Create the tag | ||
- name: Create tag | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "github-actions[bot]@users.noreply.github.com" | ||
git tag -a "${PACKAGE_VERSION}" -m "Release ${PACKAGE_VERSION}" | ||
git push origin "${PACKAGE_VERSION}" | ||
# Step 5: Create GitHub release | ||
- name: Create GitHub Release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: "${{ env.PACKAGE_VERSION }}" | ||
release_name: "Release ${{ env.PACKAGE_VERSION }}" | ||
draft: false | ||
prerelease: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |