Skip to content

Add workflow for testing dist upload #6

Add workflow for testing dist upload

Add workflow for testing dist upload #6

Workflow file for this run

name: Create tag
on:
workflow_dispatch:
push:
branches:
- master
- release/**
jobs:
create-tag:
if: ${{ vars.CREATE_TAGS }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Fetch all tags
fetch-depth: 0
submodules: true
- name: Read version file
run: echo "CURRENT_VERSION=$(cat deskflow/VERSION)" >> $GITHUB_ENV
- name: Override stage
if: ${{ !startsWith(github.ref, 'refs/heads/release') }}
run: echo "OVERRIDE_STAGE=snapshot" >> $GITHUB_ENV
- name: Get next version
id: next-version
uses: symless/actions/next-version@master
with:
current-version: ${{ env.CURRENT_VERSION }}
override-stage: ${{ env.OVERRIDE_STAGE }}
- name: Create and push Git tag
run: |
git tag ${{ steps.next-version.outputs.next-version }}
git push origin ${{ steps.next-version.outputs.next-version }}
shell: bash
- name: Trigger CI workflow
uses: actions/github-script@v7
with:
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'ci.yml',
ref: '${{ steps.next-version.outputs.next-version }}'
});