File tree 1 file changed +16
-5
lines changed 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,25 @@ jobs:
16
16
- uses : actions/checkout@v4
17
17
- name : Build
18
18
run : swift build -v -c release
19
- - name : Tag
19
+ - name : Get current date
20
+ id : date
21
+ run : echo "date=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
22
+ - name : Get run number
23
+ id : run_number
24
+ run : echo "run_number=${{ github.run_number }}" >> $GITHUB_ENV
25
+ - name : Create tag
26
+ id : create_tag
20
27
run : |
21
- echo ::set-env name=TAG::$(date +'%Y.%m.%d')_${GITHUB_RUN_NUMBER}
22
- git tag -a $TAG -m "Release $TAG"
23
- git push origin $TAG
28
+ tag_name="${{ env.date }}-${{ env.run_number }}"
29
+ echo "Tag name: $tag_name"
30
+ echo "tag_name=$tag_name" >> $GITHUB_ENV
31
+ git config --global user.name "${{ secrets.GITHUB_ACTOR }}"
32
+ git config --global user.email "${{ secrets.GITHUB_ACTOR }}@users.noreply.github.com"
33
+ git tag $tag_name
34
+ git push origin $tag_name
24
35
- name : Release
25
36
uses : softprops/action-gh-release@v2
26
37
with :
27
38
files : .build/release/swift-changelog-parser
28
39
make_latest : " true"
29
- tagName : ${{ env.TAG }}
40
+ tagName : ${{ env.tag_name }}
You can’t perform that action at this time.
0 commit comments