Skip to content

Commit

Permalink
build: Add sample config files to release ZIPs
Browse files Browse the repository at this point in the history
Implements #873
  • Loading branch information
Göran Sander committed Dec 3, 2023
1 parent 993e323 commit 03f2fdf
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,16 @@ jobs:
# notarization service

# Notarize release binary
# Include following directories & files in the created zip file.
# - ./src/config/email_templates
# - ./src/config/slack_templates
# - ./src/config/teams_templates
# - ./src/config⁄production_template.yaml
# - ./src/config⁄schedule_template.yaml
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"
# 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}" "./src/config/email_templates" "./src/config/slack_templates" "./src/config/teams_templates" "./src/config/production_template.yaml" "./src/config/schedule_template.yaml" -x "*.DS_Store"

# 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 @@ -274,6 +281,18 @@ jobs:
}
Compress-Archive @compress
// Add following directories & files to the created zip file.
// - ./src/config/email_templates
// - ./src/config/slack_templates
// - ./src/config/teams_templates
// - ./src/config⁄production_template.yaml
// - ./src/config⁄schedule_template.yaml
Compress-Archive -Path "./src/config/email_templates" -Update -DestinationPath "${env:DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-win.zip"
Compress-Archive -Path "./src/config/slack_templates" -Update -DestinationPath "${env:DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-win.zip"
Compress-Archive -Path "./src/config/teams_templates" -Update -DestinationPath "${env:DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-win.zip"
Compress-Archive -Path "./src/config/production_template.yaml" -Update -DestinationPath "${env:DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-win.zip"
Compress-Archive -Path "./src/config/schedule_template.yaml" -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 @@ -341,7 +360,7 @@ jobs:
- name: Compress release binary
run: |
ls -la
zip -9 -r ./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-linux.zip ${DIST_FILE_NAME}
zip -9 -r ./${DIST_FILE_NAME}-${{ needs.release-please.outputs.release_tag_name }}-linux.zip ${DIST_FILE_NAME} "./src/config/email_templates" "./src/config/slack_templates" "./src/config/teams_templates" "./src/config/production_template.yaml" "./src/config/schedule_template.yaml"
- name: Debug
run: |
Expand Down
30 changes: 28 additions & 2 deletions .github/workflows/insiders-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ jobs:
DestinationPath = "${env:DIST_FILE_NAME}--win-x64--${{ github.sha }}.zip"
}
Compress-Archive @compress
// Add following directories & files to the created zip file.
// - ./src/config/email_templates
// - ./src/config/slack_templates
// - ./src/config/teams_templates
// - ./src/config⁄production_template.yaml
// - ./src/config⁄schedule_template.yaml
Compress-Archive -Path "./src/config/email_templates" -Update -DestinationPath "${env:DIST_FILE_NAME}--win-x64--${{ github.sha }}.zip"
Compress-Archive -Path "./src/config/slack_templates" -Update -DestinationPath "${env:DIST_FILE_NAME}--win-x64--${{ github.sha }}.zip"
Compress-Archive -Path "./src/config/teams_templates" -Update -DestinationPath "${env:DIST_FILE_NAME}--win-x64--${{ github.sha }}.zip"
Compress-Archive -Path "./src/config/production_template.yaml" -Update -DestinationPath "${env:DIST_FILE_NAME}--win-x64--${{ github.sha }}.zip"
Compress-Archive -Path "./src/config/schedule_template.yaml" -Update -DestinationPath "${env:DIST_FILE_NAME}--win-x64--${{ github.sha }}.zip"
# dir
# artifact_release_name: release-binaries-win
# artifact_release_path: release-binaries-win/*
Expand Down Expand Up @@ -94,8 +107,14 @@ jobs:


# Notarize insider binary
# Include following directories & files in the created zip file.
# - ./src/config/email_templates
# - ./src/config/slack_templates
# - ./src/config/teams_templates
# - ./src/config⁄production_template.yaml
# - ./src/config⁄schedule_template.yaml
echo "Creating temp notarization archive for insider build"
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}" "./src/config/email_templates" "./src/config/slack_templates" "./src/config/teams_templates" "./src/config/production_template.yaml" "./src/config/schedule_template.yaml" -x "*.DS_Store"

# 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 +136,14 @@ 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/email_templates
# - ./src/config/slack_templates
# - ./src/config/teams_templates
# - ./src/config⁄production_template.yaml
# - ./src/config⁄schedule_template.yaml
echo "Creating temp notarization archive for insider build"
zip -9 -r "./${DIST_FILE_NAME}--linux-x64--${{ github.sha }}.zip" "${DIST_FILE_NAME}" "./src/config/email_templates" "./src/config/slack_templates" "./src/config/teams_templates" "./src/config/production_template.yaml" "./src/config/schedule_template.yaml"
ls -la
# artifact_release_name: release-binaries-linux
Expand Down

0 comments on commit 03f2fdf

Please sign in to comment.