This repository has been archived on 2025-06-01. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
compLIB/.github/workflows/complib-package.yml
Joel Klimont e2349c237d test6
2022-10-05 23:03:43 +02:00

46 lines
1.3 KiB
YAML

name: Build comlib.deb package
on:
push:
branches:
- build-test
jobs:
build-complib-deb:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Bump version number
uses: paulhatch/semantic-version@v4.0.2
id: next_semantic_version
with:
branch: "build-test"
tag_prefix: "v"
major_pattern: "(MAJOR)"
minor_pattern: "(MINOR)"
format: "${major}.${minor}.${patch}-${increment}"
change_path: "src/my-service"
bump_each_commit: false
- name: Print Version Numbers
run: |
echo ${{join(steps.next_semantic_version.outputs.*, ' - ')}}
echo "Next version: ${{steps.next_semantic_version.outputs.version}}"
echo "Next version tag: ${{steps.next_semantic_version.outputs.version_tag}}"
- name: Tag Commit
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/v${{steps.next_semantic_version.outputs.version}}',
sha: context.sha
})