Skip to content

Commit

Permalink
checkout tags and get write perms
Browse files Browse the repository at this point in the history
  • Loading branch information
CamJN committed Jan 14, 2024
1 parent 4b2eb8b commit fb68302
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:
jobs:
build:
runs-on: macos-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -24,6 +26,7 @@ jobs:
- uses: actions/checkout@v4
with:
path: getargv-swift
fetch-tags: true
- uses: swift-actions/setup-swift@v1
with:
swift-version: 5.9
Expand All @@ -46,7 +49,7 @@ jobs:
if-no-files-found: error
- name: Bump Version
id: bump_version
run: echo "new_version=$(git tag | sort -V | tail -1 | awk -F. 'BEGIN { OFS = "." } {$NF+=1; print $0}')" >> $GITHUB_OUTPUT
run: git tag | sort -V | tail -1 | awk -F. 'BEGIN { OFS = "." } {$NF+=1; print $0}' | xargs -I {} echo "new_version={}" >> $GITHUB_OUTPUT
working-directory: getargv-swift
- name: create && push tag
run: |
Expand Down

0 comments on commit fb68302

Please sign in to comment.