Skip to content
This repository was archived by the owner on Dec 21, 2025. It is now read-only.

Commit fe8da0f

Browse files
authored
Update main.yml
gpt
1 parent e7bc16d commit fe8da0f

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

.github/workflows/main.yml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
1-
name: "Release"
1+
name: Create Release on Tag Push
2+
23
on:
34
push:
4-
tags:
5-
- '*'
6-
workflow_dispatch:
5+
tags:
6+
- '*' # This will trigger the workflow on any tag that starts with 'v'
77

88
jobs:
9-
release:
9+
create-release:
1010
runs-on: ubuntu-latest
11-
permissions:
12-
contents: write
1311
steps:
14-
- uses: actions/checkout@v3
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Git
16+
uses: actions/setup-git@v2
17+
18+
- name: Get the tag name
19+
id: get_tag
20+
run: echo "::set-output name=tag::$(echo $GITHUB_REF | sed 's/refs\/tags\///')"
21+
22+
- name: Create a release
23+
uses: softprops/action-gh-release@v1
1524
with:
16-
ref: ${{ github.ref }}
17-
- uses: spenserblack/actions-tag-to-release@main
25+
files: mindmap.plug.js # Replace with the path to the specific file you want to include in the release
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
RELEASE_NAME: ${{ steps.get_tag.outputs.tag }} # Uses the tag name as the release name
29+
30+
- name: Upload file to release
31+
uses: softprops/action-gh-release@v1
1832
with:
19-
draft: false
20-
tag-as-title: true
21-
token: ${{ secrets.GITHUB_TOKEN }}
22-
prerelease: false
33+
files: mindmap.plug.js # Replace with the specific file you want to attach to the release
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+

0 commit comments

Comments
 (0)