Skip to content

Commit

Permalink
Merge pull request #123 from giginet/add-workflow-to-make-artifact-bu…
Browse files Browse the repository at this point in the history
…ndle

Add workflow to upload Artifact Bundle
  • Loading branch information
giginet authored May 28, 2024
2 parents cd10499 + 2fcc74f commit 0425e7e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
release:
types: [created]

name: Upload Artifact Bundle to Release
jobs:
release:
name: Build and Upload Artifact Bundle
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- name: Build Binary
run: |
# Scipio can't build for x86_64 on Apple Silicon because it uses build tools plugin
swift build --disable-sandbox -c release --arch arm64
- name: Get Current Tag
run: echo "TAG_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Make Artifact Bundle
run: |
swift package --allow-writing-to-directory . generate-artifact-bundle \
--package-version ${{ env.TAG_NAME }} \
--executable-name scipio \
--build-config release \
--build-folder .build
env:
SCIPIO_DEVELOPMENT: 1
- uses: Shopify/upload-to-release@v1
with:
name: scipio.artifactbundle.zip
path: ./scipio.artifactbundle.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
content-type: application/zip
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@ let isDevelopment = ProcessInfo.processInfo.environment["SCIPIO_DEVELOPMENT"] ==
if isDevelopment {
package.dependencies += [
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.3.0"),
.package(url: "https://github.com/freddi-kit/ArtifactBundleGen.git", from: "0.0.6"),
]
}

0 comments on commit 0425e7e

Please sign in to comment.