Skip to content

Commit

Permalink
feat: builder
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelass committed Feb 17, 2024
1 parent a687641 commit 1d9bedb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,33 @@ jobs:
name: index
path: index.json

check-release:
needs: build
runs-on: ubuntu-latest
outputs:
exists: ${{ steps.check_release.outputs.exists }}
steps:
- uses: actions/checkout@v4
- name: Check if release already exists
id: check_release
run: |
RELEASE_URL=$(curl -sH "Authorization: token ${{secrets.GITHUB_TOKEN}}" https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ needs.build.outputs.version }})
if [[ "$RELEASE_URL" == *"\"url\": \"*"* ]]; then
echo "::set-output name=exists::true"
else
echo "::set-output name=exists::false"
fi
release:
needs: [build]
needs: check-release
if: needs.check-release.outputs.exists == 'false'
runs-on: ubuntu-latest
if: needs.build.outputs.version != ''
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: index
path: .
- name: Create Release and Upload Assets
uses: softprops/action-gh-release@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "captain-marketplace",
"version": "1.0.0-alpha.1",
"version": "1.0.0-alpha.2",
"description": "",
"main": "index.js",
"type": "module",
Expand Down

0 comments on commit 1d9bedb

Please sign in to comment.