Skip to content

Commit

Permalink
fix(): Adds a release job
Browse files Browse the repository at this point in the history
  • Loading branch information
sfrehse committed Nov 12, 2024
1 parent 9644e82 commit d61ceed
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 29 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release a Module Version

on:
push:
tags:
- "v*"

jobs:
create-a-new-release:
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: hello-world
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v4

- name: Compile the modules
id: compile_the_modules
run: |
cd modules
for d in */ ; do
version=$(jq -r '.version' $d/index.json)
filename= ${d}-${version}.module
zip -z $filename
echo $filename >> release_notes.txt
done
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body_path: modules/release_notes.txt
draft: false
prerelease: false
- name: upload artifacts
id: upload_artifacts
env:
GITHUB_TOKEN: ${{ secerts.GITHUB_TOKEN }}
run: |
for module in modules/*.module; do
gh release upload ${{ github.ref }}
done
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*.module
File renamed without changes.
27 changes: 27 additions & 0 deletions modules/hello-world/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "hello-world-module",
"description": "This is a hello world module to demonstrate",
"maintainers": [
{
"name": "hello-world-maintainer"
}
],
"version": "1.0.0",
"requiredSystemVersions": [
"hivemq-enterprise/4.34.0"
],
"resources": {
"files": [
{
"type": "application/vnd+hivemq.data-policy+json",
"path": "data-policy.json.vm",
"name": "Data Policy to handle non-JSON messages"
},
{
"type": "application/vnd+hivemq.schema+json",
"path": "schema.json",
"name": "Simple JSON schema"
}
]
}
}
File renamed without changes.
File renamed without changes.
29 changes: 0 additions & 29 deletions my-custom-module/index.json

This file was deleted.

0 comments on commit d61ceed

Please sign in to comment.