Skip to content

Commit

Permalink
feat(config): Include sample config file in release ZIP
Browse files Browse the repository at this point in the history
Implements #689
  • Loading branch information
Göran Sander committed Dec 14, 2023
1 parent 27a892e commit 4c650d7
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 5 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,14 @@ jobs:

# Notarize release binary
echo "Creating temp notarization archive for release binary"
# ditto -c -k --keepParent "./${DIST_FILE_NAME}" "./${DIST_FILE_NAME}.zip"
ditto -c -k --keepParent "./${DIST_FILE_NAME}" "./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-macos.zip"
zip -r "./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-macos.zip" "./${DIST_FILE_NAME}" -x "*.DS_Store"
## ditto -c -k --keepParent "./${DIST_FILE_NAME}" "./${DIST_FILE_NAME}.zip"
#ditto -c -k --keepParent "./${DIST_FILE_NAME}" "./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-macos.zip"

# Add additional files to the zip file
cd src
zip -u -r "../${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-macos.zip" "./config/production_template.yaml" "./config/log_appender_xml" -x "*.DS_Store"
cd ..

# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
Expand Down Expand Up @@ -237,6 +243,15 @@ jobs:
}
Compress-Archive @compress
# Add following directories & files to the created zip file, in the ./config directory.
# - ./src/config/production_template.yaml
# - ./src/config/log_appender_xml
mkdir config
Copy-Item -Path ./src/config/log_appender_xml -Destination ./config/ -Recurse
Copy-Item -Path ./src/config/production_template.yaml -Destination ./config/
Compress-Archive -Path "./config" -Update -DestinationPath "./${env:DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-win.zip"
- name: Upload to existing release
uses: ncipollo/release-action@v1
with:
Expand Down Expand Up @@ -302,9 +317,17 @@ jobs:
- name: Compress release binary
run: |
# Compress insider's build
# Include following directories & files in the created archive file.
# - ./src/config/log_appender_xml
# - ./src/config⁄production_template.yaml
ls -la
zip -9 -r ./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-linux.zip ${DIST_FILE_NAME}
cd src
zip -9 -u -r "../${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-linux.zip" "./config/production_template.yaml" "./config/log_appender_xml"
- name: Debug
run: |
ls -la
Expand Down
30 changes: 27 additions & 3 deletions .github/workflows/insiders-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,16 @@ jobs:
DestinationPath = "${env:DIST_FILE_NAME}--win-x64--${{ github.sha }}.zip"
}
Compress-Archive @compress
# dir
# Add following directories & files to the created zip file, in the ./config directory.
# - ./src/config/production_template.yaml
# - ./src/config/log_appender_xml
mkdir config
Copy-Item -Path ./src/config/log_appender_xml -Destination ./config/ -Recurse
Copy-Item -Path ./src/config/production_template.yaml -Destination ./config/
Compress-Archive -Path "./config" -Update -DestinationPath "./${env:DIST_FILE_NAME}--win-x64--${{ github.sha }}.zip"
# artifact_release_name: release-binaries-win
# artifact_release_path: release-binaries-win/*
artifact_insider: butler-sos--win-x64--${{ github.sha }}.zip
Expand Down Expand Up @@ -95,7 +104,13 @@ jobs:

# Notarize insider binary
echo "Creating temp notarization archive for insider build"
ditto -c -k --keepParent "./${DIST_FILE_NAME}" "./${DIST_FILE_NAME}--macos-x64--${{ github.sha }}.zip"
# ditto -c -k --keepParent "./${DIST_FILE_NAME}" "./${DIST_FILE_NAME}--macos-x64--${{ github.sha }}.zip"
zip -r "./${DIST_FILE_NAME}--macos-x64--${{ github.sha }}.zip" "./${DIST_FILE_NAME}" -x "*.DS_Store"

# Add additional files to the zip file
cd src
zip -u -r "../${DIST_FILE_NAME}--macos-x64--${{ github.sha }}.zip" "./config/production_template.yaml" "./config/log_appender_xml" -x "*.DS_Store"
cd ..

# Here we send the notarization request to the Apple's Notarization service, waiting for the result.
# This typically takes a few seconds inside a CI environment, but it might take more depending on the App
Expand All @@ -117,7 +132,16 @@ jobs:
chmod +x ${DIST_FILE_NAME}
# Compress insider's build
tar -czf "${DIST_FILE_NAME}--linux-x64--${{ github.sha }}.tgz" "${DIST_FILE_NAME}"
# Include following directories & files in the created archive file.
# - ./src/config/log_appender_xml
# - ./src/config⁄production_template.yaml
ls -la
zip -9 -r ./${DIST_FILE_NAME}--linux-x64--${{ github.sha }}.zip ${DIST_FILE_NAME}
cd src
zip -9 -u -r "../${DIST_FILE_NAME}--linux-x64--${{ github.sha }}.zip" "./config/production_template.yaml" "./config/log_appender_xml"
ls -la
# artifact_release_name: release-binaries-linux
Expand Down
File renamed without changes.

0 comments on commit 4c650d7

Please sign in to comment.