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 9, 2024
1 parent 3a1168d commit f5c8185
Showing 1 changed file with 13 additions and 54 deletions.
67 changes: 13 additions & 54 deletions .github/workflows/auto release.yml
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 }}

0 comments on commit f5c8185

Please sign in to comment.