Skip to content

Commit 4395564

Browse files
Add release github workflow
1 parent d7733ff commit 4395564

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Release
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: Version of the release
8+
jobs:
9+
release:
10+
runs-on: ubuntu-22.04
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Checkout sources
15+
uses: actions/checkout@v4
16+
with:
17+
ref: main
18+
# Get Git tags so that versioneer can function correctly
19+
# See issue https://github.com/actions/checkout/issues/701
20+
fetch-depth: 0
21+
- name: Update "main" branch
22+
run: |-
23+
# Merge dev into main, tag the merge commit
24+
git merge --no-ff -m'Merge branch 'dev' for release ${{ inputs.version }}' dev
25+
git tag ${{ inputs.version }}
26+
27+
# Make dev point to main
28+
git switch dev
29+
git reset --hard main
30+
31+
# Update remotes
32+
git switch dev
33+
git push
34+
git switch main
35+
git push

0 commit comments

Comments
 (0)