From fb68302ec392fe24461bac7026372aa89cfe3b36 Mon Sep 17 00:00:00 2001 From: Camden Narzt Date: Sat, 13 Jan 2024 22:12:39 -0700 Subject: [PATCH] checkout tags and get write perms --- .github/workflows/swift.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 476efef..1f46075 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -12,6 +12,8 @@ on: jobs: build: runs-on: macos-latest + permissions: + contents: write steps: - uses: actions/checkout@v4 with: @@ -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 @@ -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: |