Skip to content

Commit

Permalink
Create add-release-asset-ubuntu.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHenryIE committed Sep 5, 2023
1 parent 2a74e70 commit c061fbb
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/add-release-asset-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and attach on releases

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest

steps:

- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name }}

# Should output executable to `.build/release/swift-format`
- name: Build
run: swift build --disable-sandbox -c release

# Zip the executable so it can be given a descriptive name to distinguish the MacOS and Ubuntu builds
- name: Create archive
id: create-plugin-archive
run: |
FILENAME=swift-format.${{ github.event.release.name }}.ubuntu.zip
zip $FILENAME .build/release/swift-format
echo "ARCHIVE_ABSOLUTE_FILEPATH=$(pwd)/$FILENAME" >> $GITHUB_OUTPUT;
- uses: meeDamian/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: ${{ steps.create-plugin-archive.outputs.ARCHIVE_ABSOLUTE_FILEPATH }}
gzip: false
allow_override: true

0 comments on commit c061fbb

Please sign in to comment.