Skip to content

Commit de127b1

Browse files
committed
change tag and release libraries
1 parent 330407c commit de127b1

2 files changed

Lines changed: 40 additions & 26 deletions

File tree

.github/workflows/main-workflow.yaml

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,46 +30,60 @@ jobs:
3030
if-no-files-found: error
3131

3232
tag:
33-
name: create tag
33+
name: Create tag and Release
3434
needs: [build]
3535
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
3636
runs-on: ubuntu-latest
3737
permissions:
3838
contents: write
3939
steps:
4040
- uses: actions/checkout@v3
41-
with:
42-
fetch-depth: '0'
4341

4442
- name: Bump version and push tag
45-
uses: anothrNick/github-tag-action@1.64.0 # Don't use @master or @v1 unless you're happy to test the latest version
46-
env:
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
48-
WITH_V: true
49-
DEFAULT_BUMP: patch
50-
51-
publish:
52-
needs: [tag]
53-
name: publish release
54-
runs-on: ubuntu-latest
55-
permissions:
56-
contents: write
57-
steps:
58-
- name: Checkout
59-
uses: actions/checkout@v3
43+
id: tag_version
44+
uses: mathieudutour/github-tag-action@v6.1
45+
with:
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
6047

6148
- uses: actions/download-artifact@v3
6249
with:
6350
path: cli-utils/bin
6451

6552
- name: Display structure of downloaded files
66-
run: ls -R
53+
run: ls -al
6754
working-directory: cli-utils/bin
6855

69-
- name: Publish release
70-
uses: ghalactic/github-release-from-tag@v5
56+
- name: Publish Release
57+
uses: ncipollo/release-action@v1
7158
with:
72-
generateReleaseNotes: "true"
73-
assets: |
74-
- path: cli-utils/bin/*
75-
optional: true
59+
artifacts: cli-utils/bin/*
60+
tag: ${{ steps.tag_version.outputs.new_tag }}
61+
name: Release ${{ steps.tag_version.outputs.new_tag }}
62+
body: ${{ steps.tag_version.outputs.changelog }}
63+
64+
# - name: Bump version and push tag
65+
# uses: anothrNick/github-tag-action@1.64.0 # Don't use @master or @v1 unless you're happy to test the latest version
66+
# env:
67+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
68+
# WITH_V: true
69+
# DEFAULT_BUMP: patch
70+
71+
# publish:
72+
# needs: [tag]
73+
# name: publish release
74+
# runs-on: ubuntu-latest
75+
# permissions:
76+
# contents: write
77+
# steps:
78+
# - name: Checkout
79+
# uses: actions/checkout@v3
80+
#
81+
#
82+
83+
# - name: Publish release
84+
# uses: ghalactic/github-release-from-tag@v5
85+
# with:
86+
# generateReleaseNotes: "true"
87+
# assets: |
88+
# - path: cli-utils/bin/*
89+
# optional: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![](https://github.com/GuihVicentini/cli-utils/actions/workflows/build-native.yml/badge.svg)
1+
![](https://github.com/GuihVicentini/cli-utils/actions/workflows/main-workflow.yaml/badge.svg)
22

33
# cli-utils
44
Multiple useful command line programs using Java, GraalVM, Gradle and GitHubActions

0 commit comments

Comments
 (0)