Compare commits
6 Commits
main
...
8ffaa90594
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ffaa90594 | |||
| c3a7f917a9 | |||
| de15869ceb | |||
| 159518b08c | |||
|
|
8ab72fcdeb | ||
| f962a5a85d |
@@ -2,6 +2,9 @@ name: Release
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read # for checkout
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
@@ -13,36 +16,5 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Prepare git
|
|
||||||
run: |
|
|
||||||
git config --global user.email "gitea@bjornp.com"
|
|
||||||
git config --global user.name "gitea-actions"
|
|
||||||
|
|
||||||
- name: Determine release version and changelog
|
- name: Determine release version and changelog
|
||||||
run: npx commit-and-tag-version
|
run: npx semantic-release
|
||||||
|
|
||||||
- name: Build release
|
|
||||||
working-directory: src
|
|
||||||
run: |
|
|
||||||
VERSION=$(jq '.version' info.json | xargs echo -n)
|
|
||||||
zip -r ../prometheus-exporter_$VERSION.zip .
|
|
||||||
|
|
||||||
- name: Push changelog and tag
|
|
||||||
run: git push --follow-tags
|
|
||||||
|
|
||||||
- name: Get latest tag and changelog fragment
|
|
||||||
id: tag
|
|
||||||
run: |
|
|
||||||
echo tag="$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
|
|
||||||
echo "changelog<<EOF" >> $GITHUB_OUTPUT
|
|
||||||
awk '/^## / { if (version_found) exit; version_found=1 } version_found { print }' CHANGELOG.md | sed '1d' >> $GITHUB_OUTPUT
|
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Create release
|
|
||||||
uses: akkuman/gitea-release-action@v1
|
|
||||||
with:
|
|
||||||
files: prometheus-exporter_*.zip
|
|
||||||
body: ${{ steps.tag.outputs.changelog }}
|
|
||||||
name: ${{ steps.tag.outputs.tag }}
|
|
||||||
tag_name: ${{ steps.tag.outputs.tag }}
|
|
||||||
md5sum: true
|
|
||||||
|
|||||||
11
.releaserc.json
Normal file
11
.releaserc.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"branches": [
|
||||||
|
"main",
|
||||||
|
"beta"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"@semantic-release/commit-analyzer",
|
||||||
|
"@semantic-release/release-notes-generator"
|
||||||
|
],
|
||||||
|
"publish": false
|
||||||
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"packageFiles": [
|
|
||||||
{
|
|
||||||
"filename": "src/info.json",
|
|
||||||
"type": "json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"bumpFiles": [
|
|
||||||
{
|
|
||||||
"filename": "src/info.json",
|
|
||||||
"type": "json"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
# Changelog
|
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
||||||
|
|
||||||
## 0.0.2 (2025-10-07)
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "prometheus-exporter",
|
"name": "prometheus-exporter",
|
||||||
"version": "0.0.2",
|
"version": "0.0.1",
|
||||||
"title": "Prometheus Exporter for Factorio",
|
"title": "Prometheus Exporter for Factorio",
|
||||||
"author": "Bjorn Pijnacker",
|
"author": "Bjorn Pijnacker",
|
||||||
"factorio_version": "2.0",
|
"factorio_version": "2.0",
|
||||||
@@ -8,4 +8,4 @@
|
|||||||
"base >= 2.0"
|
"base >= 2.0"
|
||||||
],
|
],
|
||||||
"description": "Exports certain production and consumption metrics to Prometheus format, to be used by Prometheus/Grafana monitoring stack"
|
"description": "Exports certain production and consumption metrics to Prometheus format, to be used by Prometheus/Grafana monitoring stack"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user