Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
marekpridal committed Nov 20, 2024
1 parent c00c7f9 commit 3258789
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 47 deletions.
46 changes: 5 additions & 41 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,17 @@ on:
jobs:
build:
name: Publish binaries
runs-on: macOS-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Generate Xcode project
run: swift package generate-xcodeproj

- name: Set version
run: /usr/libexec/Plistbuddy -c "Set CFBundleVersion ${GITHUB_REF#refs/*/}" LogKit.xcodeproj/LogKit_Info.plist

- name: Build
run: ./create-xcframework.sh

- name: Create LogKit.xcframework.zip
run: zip -r artifacts/LogKit.xcframework.zip artifacts/LogKit.xcframework

- name: Upload artifact of LogKit.xcframework
uses: actions/[email protected]
with:
name: LogKit.xcframework
path: ./artifacts/LogKit.xcframework

- name: Upload artifact of LogKit.xcframework.zip
uses: actions/[email protected]
with:
name: LogKit.xcframework.zip
path: ./artifacts/LogKit.xcframework.zip
- uses: actions/checkout@v4

- name: Create Release
id: create_release
uses: actions/create-release@v1
uses: "marvinpinto/action-automatic-releases@latest"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./artifacts/LogKit.xcframework.zip
asset_name: LogKit.xcframework.zip
asset_content_type: application/zip
title: "Release ${{ github.ref_name }}"
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on: [push, pull_request]
jobs:
build:
name: Build
runs-on: macOS-latest
runs-on: macOS-15

steps:
- name: Checkout branch
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Build
run: swift build -v
4 changes: 2 additions & 2 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on: [push, pull_request]

jobs:
swiftlint:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

steps:
- name: Checkout branch
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: GitHub Action for SwiftLint with --strict
uses: norio-nomura/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on: [push, pull_request]
jobs:
test:
name: Test
runs-on: macOS-latest
runs-on: macOS-15

steps:
- name: Checkout branch
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Test
run: swift test -v --enable-test-discovery --enable-code-coverage --sanitize=thread

0 comments on commit 3258789

Please sign in to comment.