Skip to content

Release

Release #7

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
draft:
type: boolean
default: true
jobs:
build:
uses: ./.github/workflows/build.yml
with:
buildtype: release
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download tarball
uses: actions/download-artifact@v4
- name: Create tag
uses: actions/github-script@v5
with:
script: |
const tagName = `refs/tags/${{ needs.build.outputs.version }}`;
// Check if the tag already exists
try {
await github.rest.git.getRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: tagName
});
console.log(`Tag ${tagName} already exists. Skipping creation.`);
} catch (error) {
if (error.status === 404) {
// Tag does not exist, create it
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: tagName,
sha: context.sha
});
console.log(`Tag ${tagName} created.`);
} else {
throw error;
}
}
- name: ls debug
run: |
ls -R
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: linux-enable-ir-emitter-*.tar.gz
tag_name: ${{ needs.build.outputs.version }}
fail_on_unmatched_files: true
draft: ${{ github.event.inputs.draft }}
make_latest: true
body: |
## What's Changed
See [CHANGELOG.md](https://github.com/EmixamPP/linux-enable-ir-emitter/blob/master/CHANGELOG.md)
## Contributors
@EmixamPP