Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6f5bf2
commit 06ddd88
Showing
3 changed files
with
74 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
# Set variables | ||
repo_owner="obsidian-confluence" | ||
repo_name="obsidian-confluence" | ||
version="$1" | ||
|
||
if [ -z "$version" ]; then | ||
echo "Please provide a version number as an argument" | ||
exit 1 | ||
fi | ||
|
||
prefixes=( | ||
"" | ||
"obsidian-confluence" | ||
"obsidian-confluence-root" | ||
"@markdown-confluence/lib" | ||
"@markdown-confluence/mermaid-electron-renderer" | ||
) | ||
|
||
mkdir -p .artifacts | ||
cd .artifacts | ||
|
||
for prefix in "${prefixes[@]}"; do | ||
# Add a '-' only if the prefix is not empty | ||
if [ -n "$prefix" ]; then | ||
prefix_with_dash="$prefix-v" | ||
else | ||
prefix_with_dash="" | ||
fi | ||
|
||
# Create download URL | ||
tag="${prefix_with_dash}$version" | ||
download_url="https://github.com/$repo_owner/$repo_name/archive/refs/tags/$tag.tar.gz" | ||
file_name="$tag.tar.gz" | ||
|
||
# Download the tar.gz file | ||
curl -L -o "$file_name" "$download_url" | ||
|
||
# Sign the tar.gz file | ||
gpg --armor --detach-sign "$file_name" | ||
|
||
gh release upload $tag $file_name | ||
|
||
echo "Signature for $tag uploaded to to https://github.com/obsidian-confluence/obsidian-confluence/releases/tag/$tag" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
ORIGINAL_TAG="$1" | ||
SHA="$2" | ||
|
||
ORIGINAL_PATH=$PWD | ||
|
||
mkdir -p packages/obsidian/dist/ | ||
cp README.md packages/obsidian/dist/ | ||
cp manifest.json packages/obsidian/dist/ | ||
|
||
npm ci | ||
npm run lint -ws --if-present | ||
npm run prettier-check -ws --if-present | ||
npm run build -ws --if-present | ||
|
||
IFS='-v' read -ra PARTS <<< "$ORIGINAL_TAG" | ||
TAG="${PARTS[-1]}" | ||
|
||
cd packages/obsidian | ||
|
||
FILES=$(echo dist/*) | ||
gh release create $TAG -t $TAG --generate-notes --latest --target $SHA ./dist/* | ||
echo $FILES | ||
|
||
cd $ORIGINAL_PATH | ||
./.build/sign-release $TAG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters