Skip to content

Commit

Permalink
fix: Add new manifest.json to allow new commit for release to be tagg…
Browse files Browse the repository at this point in the history
…ed against
  • Loading branch information
andymac4182 committed Apr 26, 2023
1 parent c572ee1 commit f35d0a4
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions .build/upload-release-assets.sh
@@ -1,9 +1,25 @@
#!/bin/bash

ORIGINAL_PATH=$PWD

git config user.name "andymac4182"
git config user.email "andrew.mcclenaghan@gmail.com"

cp manifest.json ./.release-repo/manifest.json
cd ./.release-repo
git add manifest.json
git commit -m "Update manifest for $TAG release."
commit_sha=$(git rev-parse HEAD)
git push

cd $ORIGINAL_PATH

ORIGINAL_TAG="$1"
SHA="$2"

ORIGINAL_PATH=$PWD
IFS='-v' read -ra PARTS <<< "$ORIGINAL_TAG"
TAG="${PARTS[-1]}"
echo "CurrentVersion=$TAG" >> "$GITHUB_OUTPUT"

mkdir -p packages/obsidian/dist/
cp README.md packages/obsidian/dist/
Expand All @@ -14,23 +30,11 @@ 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]}"
echo "CurrentVersion=$TAG" >> "$GITHUB_OUTPUT"

cd packages/obsidian

FILES=$(echo dist/*)
gh release create $TAG -R markdown-confluence/obsidian-integration -t $TAG --generate-notes --latest --target $SHA ./dist/*
gh release create $TAG -R markdown-confluence/obsidian-integration -t $TAG --generate-notes --latest --target $commit_sha ./dist/*
echo $FILES

cd $ORIGINAL_PATH

git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com

cp manifest.json ./.release-repo/manifest.json
cd ./.release-repo
git add manifest.json
git commit -m "Update manifest for $TAG release."
git push

0 comments on commit f35d0a4

Please sign in to comment.