Skip to content

Building Swift packages on Windows using GitHub Actions - part 11 #18

Building Swift packages on Windows using GitHub Actions - part 11

Building Swift packages on Windows using GitHub Actions - part 11 #18

Workflow file for this run

name: Create Release

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

`concurrency` is not a valid event name
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
build-mac-executable:
name: Create Release
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Build executable for release
run: swift build -c release --arch arm64 --arch x86_64 --product chatgpt
- name: Compress archive
run: tar -czf ${{ github.ref_name }}.tar.gz -C .build/apple/Products/Release chatgpt
- name: Create release and upload executable to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ github.ref_name }}.tar.gz
tag: ${{ github.ref }}
overwrite: true
build-windows-executable:
name: Build Windows Executable
runs-on: windows-latest
steps:
- uses: compnerd/gha-setup-swift@main
with:
branch: swift-5.7.1-release
tag: 5.7.1-RELEASE
- uses: actions/checkout@v4
- run: git config --global core.protectNTFS false
- run: swift build -c release --product chatgpt
- run: cp .build\release\chatgpt.exe chatgpt.exe
- uses: actions/upload-artifact@v3
with:
name: chatgpt-windows.exe
path: chatgpt.exe