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
3a1168d
commit f5c8185
Showing
1 changed file
with
13 additions
and
54 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,63 +1,22 @@ | ||
name: AutoRelease | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Install unzip | ||
run: sudo apt-get update && sudo apt-get install -y unzip | ||
|
||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
name: Artifacts | ||
path: ./build/libs | ||
|
||
- name: Unzip Artifact | ||
run: | | ||
echo "Unzipping artifact..." | ||
unzip -d ./extracted ./build/libs/Artifacts.zip | ||
ls -l ./extracted | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
with: | ||
tag_name: "latest" # or use a dynamic tag if applicable | ||
release_name: "Release latest" | ||
body: | | ||
Changes in this release: | ||
- Add your changes here | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
node-version: 16 | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npx semantic-release | ||
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 | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |