generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.23 KB
/
auto-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: auto-release
run-name: Move ${{ github.event.inputs.main_version }} to ${{ github.event.inputs.tag_name }}
on:
workflow_dispatch:
inputs:
tag_name:
description: The tag or reference to use
required: true
main_version:
type: choice
description: The main version to update
options:
- v0
jobs:
auto-release:
runs-on: ubuntu-latest
timeout-minutes: 3
permissions:
contents: write
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure git
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
- name: Tag new target
run: git tag -f ${{ github.event.inputs.main_version }} ${{ github.event.inputs.tag_name }}
- name: Push new tag
run: git push origin ${{ github.event.inputs.main_version }} --force
- name: Release
uses: softprops/action-gh-release@v2
with:
name: ${{ github.event.inputs.tag_name }}
tag_name: ${{ github.event.inputs.tag_name }}
draft: false
prerelease: false
generate_release_notes: true