Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 12 additions & 23 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ on:
push:
branches:
- main
tags:
- "v*"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
release-please:
if: startsWith(github.ref, 'refs/tags/')
# Only run release-please on pushes to main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -25,15 +24,6 @@ jobs:
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
start:
# This prevents a tag running twice as it'll have a "tag" and a "commit" event
# We only want the tag to run the action as it'll be able to create the release notes
if: (startsWith(github.event.ref, 'refs/heads/') && !startsWith(github.event.head_commit.message, 'chore(release)')) || (startsWith(github.event.ref, 'refs/tags/') && startsWith(github.event.head_commit.message, 'chore(release)'))
runs-on: ubuntu-latest
steps:
- name: Validate branch and tag
run: exit 0

test-api:
defaults:
run:
Expand Down Expand Up @@ -448,11 +438,10 @@ jobs:
DEST_DIR: unraid-api

create-draft-release:
# Only create new draft if this is a version tag
if: |
startsWith(github.ref, 'refs/tags/v')
# Only run if release-please created a release
if: needs.release-please.outputs.releases_created
runs-on: ubuntu-latest
needs: [test-api, build-plugin]
needs: [release-please, test-api, build-plugin]
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand All @@ -468,12 +457,12 @@ jobs:
mv plugins/production/dynamix.unraid.net.plg release/
mv archive/*.txz release/

- name: Create Github release
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: false
files: |
release/*
- name: Upload Release Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# For each file in release directory
for file in release/*; do
echo "Uploading $file to release..."
gh release upload ${{ needs.release-please.outputs.tag_name }} "$file" --clobber
done
1 change: 0 additions & 1 deletion .release-please-manifest.json

This file was deleted.

21 changes: 18 additions & 3 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
"api": {},
"web": {}
"api": {
"package-name": "@unraid/api",
"release-type": "node"
},
"web": {
"package-name": "@unraid/web",
"release-type": "node"
},
"unraid-ui": {
"package-name": "@unraid/ui",
"release-type": "node"
},
"plugin": {
"package-name": "@unraid/connect-plugin",
"release-type": "node"
}
},
"separate-pull-requests": false,
"include-component-in-tag": false,
"skip-github-release": true
"draft": true
}
Loading