forked from bunnyi116/fabric-bedrock-miner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd82107
commit 0fb5ffe
Showing
1 changed file
with
41 additions
and
10 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,57 @@ | ||
# This is a basic workflow to help you get started with the GitHub Auto-Release on Commit Action. | ||
|
||
name: AutoRelease | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
release: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: CupOfTea696/[email protected] | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
title: "Release: $version" | ||
tag: "v$semver" | ||
node-version: '14' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Find and Extract .jar from ZIP | ||
run: | | ||
# Find the ZIP file | ||
ZIP_FILE=$(find . -type f -name "*.zip") | ||
echo "Found ZIP file: $ZIP_FILE" | ||
# Extract the .jar file from the ZIP | ||
unzip -j "$ZIP_FILE" "*.jar" -d ./extracted | ||
ls -l ./extracted | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: | | ||
Changes in this release: | ||
- Add your changes here | ||
draft: false | ||
regex: "/^Release: #{semver}$/i" | ||
prerelease: false | ||
|
||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./extracted/*.jar | ||
asset_name: $(basename ./extracted/*.jar) | ||
asset_content_type: application/java-archive |