Skip to content

Commit

Permalink
hopefully fixed auto release
Browse files Browse the repository at this point in the history
  • Loading branch information
krispyking24 committed Aug 10, 2024
1 parent 7633418 commit fce5cdc
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 130 deletions.
73 changes: 0 additions & 73 deletions .github/workflows/auto release.yml

This file was deleted.

62 changes: 31 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,35 @@
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.

name: build
on: [pull_request, push]
# name: build
# on: [pull_request, push]

jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
21, # Current Java LTS
]
runs-on: ubuntu-22.04
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
# jobs:
# build:
# strategy:
# matrix:
# # Use these Java versions
# java: [
# 21, # Current Java LTS
# ]
# runs-on: ubuntu-22.04
# steps:
# - name: checkout repository
# uses: actions/checkout@v4
# - name: validate gradle wrapper
# uses: gradle/wrapper-validation-action@v2
# - name: setup jdk ${{ matrix.java }}
# uses: actions/setup-java@v4
# with:
# java-version: ${{ matrix.java }}
# distribution: 'microsoft'
# - name: make gradle wrapper executable
# run: chmod +x ./gradlew
# - name: build
# run: ./gradlew build
# - name: capture build artifacts
# if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java
# uses: actions/upload-artifact@v4
# with:
# name: Artifacts
# path: build/libs/
26 changes: 0 additions & 26 deletions .github/workflows/main.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release

on:
workflow_dispatch:

jobs:
release:
permissions:
contents: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- run: npm ci
- run: npm run build
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const config = {
branches: ['main'],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
["@semantic-release/git", {
"assets": ["dist/*.js", "dist/*.js.map"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
'@semantic-release/github'
]
};

module.exports = config;

0 comments on commit fce5cdc

Please sign in to comment.