Skip to content

💚 Fix path to executable #12

💚 Fix path to executable

💚 Fix path to executable #12

Workflow file for this run

name: Swift
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: write
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: swift build -v -c release --arch arm64 --arch x86_64
- name: Make executable
run: chmod +x .build/apple/Products/Release/swift-changelog-parser
- name: Get current date
id: date
run: echo "date=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
- name: Get run number
id: run_number
run: echo "run_number=${{ github.run_number }}" >> $GITHUB_ENV
- name: Create tag
id: create_tag
run: |
tag_name="${{ env.date }}-${{ env.run_number }}"
echo "Tag name: $tag_name"
echo "tag_name=$tag_name" >> $GITHUB_ENV
git config --global user.name "${{ secrets.GITHUB_ACTOR }}"
git config --global user.email "${{ secrets.GITHUB_ACTOR }}@users.noreply.github.com"
git tag $tag_name
git push origin $tag_name
- name: Release
uses: softprops/action-gh-release@v2
with:
files: .build/apple/Products/Release/swift-changelog-parser
make_latest: "true"
tag_name: ${{ env.tag_name }}