Skip to content

Add headers to time sync request (#20) #3

Add headers to time sync request (#20)

Add headers to time sync request (#20) #3

Workflow file for this run

name: Create Release with SemVer
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # e.g., v1.2.3
workflow_dispatch:
inputs:
version:
description: 'Semantic Version (e.g., v1.2.3)'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Determine Version
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
- name: Validate Semantic Versioning
run: |
if ! [[ $VERSION =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: Version does not follow semantic versioning"
exit 1
fi
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
draft: false
prerelease: false