Skip to content

Commit

Permalink
feat: release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
yhortuk committed Aug 11, 2023
1 parent 4f14e9f commit 17282b7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 10 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/releases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Releases

on:
workflow_dispatch:
inputs:
tag:
description: 'New tag name'
required: true

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run tag creation
run: git tag ${{ github.event.inputs.tag }}
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
- name: Run binary build
run: |
chmod +x ./build/build.sh
./build/build.sh
chmod +x ./builds/unload-0.1.2-linux
chmod +x ./builds/unload-0.1.2-macos
./builds/unload-0.1.2-linux --version
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.event.inputs.tag }}
fail_on_unmatched_files: true
draft: true
files: |
builds/unload-${{ github.event.inputs.tag }}-linux
builds/unload-${{ github.event.inputs.tag }}-macos
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unload Pipeline
name: Tests

on:
push:
Expand All @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.1
- run: |
pip install aws-sam-cli
pip install localstack
Expand Down
3 changes: 1 addition & 2 deletions box.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"config",
"cloudformation",
"vendor",
"resources",
"layers"
"resources"
],
"files": [
"composer.json"
Expand Down
9 changes: 3 additions & 6 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ $SCRIPT_DIR/../unload app:build --build-version=$LATEST_TAG

echo "Creating static binaries..."

mkdir -p $SCRIPT_DIR/../builds/linux
mkdir -p $SCRIPT_DIR/../builds/macos
cat $SCRIPT_DIR/linux.sfx $SCRIPT_DIR/../builds/unload > $SCRIPT_DIR/../builds/unload-$LATEST_TAG-linux
cat $SCRIPT_DIR/macos.sfx $SCRIPT_DIR/../builds/unload > $SCRIPT_DIR/../builds/unload-$LATEST_TAG-macos

cat $SCRIPT_DIR/linux.sfx $SCRIPT_DIR/../builds/unload > $SCRIPT_DIR/../builds/linux/unload
cat $SCRIPT_DIR/macos.sfx $SCRIPT_DIR/../builds/unload > $SCRIPT_DIR/../builds/macos/unload

echo "Build complete!"
echo "Build complete!"

0 comments on commit 17282b7

Please sign in to comment.