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
15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,22 @@ on:
- .gitignore
- docker/**
- "**/*.md"
branches-ignore:
- main
pull_request:
paths-ignore:
- .gitignore
- docker/**
- "**/*.md"
workflow_dispatch:
workflow_call:
outputs:
openmenu-artifact-id:
description: ID of the uploaded openmenu artifact
value: ${{ jobs.openmenu.outputs.openmenu-artifact-id }}
tools-artifact-id:
description: ID of the uploaded tools artifact
value: ${{ jobs.openmenu.outputs.tools-artifact-id }}

permissions:
contents: read
Expand All @@ -22,6 +32,9 @@ concurrency:

jobs:
openmenu:
outputs:
openmenu-artifact-id: ${{ steps.openmenu-artifact.outputs.artifact-id }}
tools-artifact-id: ${{ steps.tools-artifact.outputs.artifact-id }}
runs-on: ubuntu-latest
container:
image: sbstnc/openmenu-dev:0.2.2
Expand All @@ -47,6 +60,7 @@ jobs:

- name: Upload openmenu artifacts
uses: actions/upload-artifact@v4
id: openmenu-artifact
with:
name: openmenu
path: |
Expand All @@ -55,6 +69,7 @@ jobs:

- name: Upload tool artifacts
uses: actions/upload-artifact@v4
id: tools-artifact
with:
name: tools
path: |
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write
issues: write

name: release-please

jobs:
release-please:
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
runs-on: ubuntu-latest
steps:
- name: Release Please
uses: googleapis/release-please-action@v4
id: release

- name: Check out source code
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4

- name: Tag major and minor versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

call-ci:
needs: [ release-please ]
if: ${{ needs.release-please.outputs.release_created }}
uses: ./.github/workflows/ci.yaml

attach-artifacts:
needs: [ release-please, call-ci ]
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ubuntu-latest
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
artifact-ids: ${{ needs.call-ci.outputs.openmenu-artifact-id }},${{ needs.call-ci.outputs.tools-artifact-id }}
path: ./artifacts

- name: Upload release artifacts
run: |
zip -r -j ./artifacts/openmenu.zip ./artifacts/openmenu/
zip -r -j ./artifacts/tools-linux-x64.zip ./artifacts/tools/
gh release upload ${{ needs.release-please.outputs.tag_name }} \
./artifacts/openmenu.zip \
./artifacts/tools-linux-x64.zip \
--clobber
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.0.0"
}
12 changes: 12 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"release-type": "simple",
"include-component-in-tag": false,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"plugins": ["sentence-case"],
"packages": {
".": {
"package-name": "openmenu"
}
}
}
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0