File tree 1 file changed +2
-20
lines changed 1 file changed +2
-20
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,8 @@ name: Swift
2
2
3
3
on :
4
4
push :
5
- branches : ["main"]
6
- pull_request :
7
- branches : ["main"]
5
+ tags :
6
+ - " **"
8
7
9
8
permissions :
10
9
contents : write
16
15
- uses : actions/checkout@v4
17
16
- name : Build
18
17
run : swift build -v --disable-sandbox -c release --arch arm64 --arch x86_64
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
27
- run : |
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
35
18
- name : Release
36
19
uses : softprops/action-gh-release@v2
37
20
with :
38
21
files : .build/apple/Products/Release/swift-changelog-parser
39
22
make_latest : " true"
40
- tag_name : ${{ env.tag_name }}
You can’t perform that action at this time.
0 commit comments