Skip to content

Commit

Permalink
Update auto release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
krispyking24 authored Aug 5, 2024
1 parent fd82107 commit 0fb5ffe
Showing 1 changed file with 41 additions and 10 deletions.
51 changes: 41 additions & 10 deletions .github/workflows/auto release.yml
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

0 comments on commit 0fb5ffe

Please sign in to comment.