Skip to content

Commit

Permalink
Attempt to stuff everything into an artifact bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
nicorichard committed Oct 6, 2024
1 parent b882f44 commit 8435cc8
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/artifactbundle.json.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"schemaVersion": "1.0",
"artifacts": {
"xcstringslint": {
"version": "__VERSION__",
"type": "executable",
"variants": [
{
"path": "xcstringslint-__VERSION__-macos/bin/xcstringslint",
"supportedTriples": ["x86_64-apple-macosx", "arm64-apple-macosx"]
}
]
}
}
}
15 changes: 14 additions & 1 deletion .github/workflows/archive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,20 @@ jobs:
mv $(swift build -c release --arch x86_64 --arch arm64 --show-bin-path) artifact
echo "path=artifact/xcstringslint" >> "$GITHUB_OUTPUT"
- name: Build artifact bundle
run: |
VERSION="${{ github.ref_name }}"
ARTIFACT_FOLDER_NAME="XCStringsLint.artifactbundle/xcstringslint-$(VERSION)-macos"
mkdir -p "$(ARTIFACT_FOLDER_NAME)/bin"
sed 's/__VERSION__/$(VERSION)/g' .github/artifactbundle.json.template > "$(ARTIFACT_FOLDER_NAME)/info.json"
cp -f "${{ steps.build.outputs.path }}" "$(ARTIFACT_FOLDER_NAME)/bin"
cp -f "LICENSE" "$(ARTIFACT_FOLDER_NAME)"
(zip -yr - "XCStringsLint.artifactbundle") > "./XCStringsLint-macos.artifactbundle.zip"
- name: Upload binary to release
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.build.outputs.path }}
files: XCStringsLint-macos.artifactbundle.zip

0 comments on commit 8435cc8

Please sign in to comment.