Skip to content

Commit

Permalink
Setting up GH actions release (#4)
Browse files Browse the repository at this point in the history
* v0.3.0
  • Loading branch information
uguraslan authored Sep 18, 2023
1 parent cc1a529 commit 3cf3f66
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/release-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,9 @@ jobs:
- name: Rename VSIX
run: mv *.vsix ${{ env.EXTENSION_NAME }}.v${{ env.EXTENSION_VERSION }}.vsix

- name: Capture PR Merge Message
id: capture_pr_msg
run: |
merge_msg=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/pulls?state=closed&sort=updated&direction=desc&per_page=1" | \
jq -r '.[0].title + "\n\n" + .[0].body' | base64)
echo "PR_MERGE_MSG_BASE64=$merge_msg" >> $GITHUB_ENV

- name: Create GitHub Release and Upload VSIX
# Create GitHub Pre Release and Upload VSIX
- name: Create GitHub Pre Release and Upload VSIX
run: |
gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
decoded_merge_msg=$(echo "${{ env.PR_MERGE_MSG_BASE64 }}" | base64 --decode)
gh release create v${{ env.EXTENSION_VERSION }} ./${{ env.EXTENSION_NAME }}.v${{ env.EXTENSION_VERSION }}.vsix -t "bolt-vscode v${{ env.EXTENSION_VERSION }}" -n "$decoded_merge_msg"
gh release create v${{ env.EXTENSION_VERSION }} ./${{ env.EXTENSION_NAME }}.v${{ env.EXTENSION_VERSION }}.vsix --prerelease -t "bolt-vscode v${{ env.EXTENSION_VERSION }}" -n "Version ${{ env.EXTENSION_VERSION }} of ${{ env.EXTENSION_NAME }}"

0 comments on commit 3cf3f66

Please sign in to comment.