Skip to content

Commit

Permalink
add artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
sadraiiali committed Apr 22, 2024
1 parent c1ec850 commit e057fde
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,21 @@ jobs:
path: ${{ github.workspace }}/artifact/*
retention-days: 5

- name: Check if there is no release with the same tag
id: check_release
run: |
curl -s -o /dev/null -w "%{http_code}" https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ github.ref_name }} -u ${{ secrets.GITHUB_TOKEN }}:
echo "::set-output name=release_exists::${{ steps.check_release.outputs.stdout }}"
# ------------------------------------------- Release
- uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/')
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
if: steps.check_release.outputs.release_exists == '404'
with:
artifacts: "${{ github.workspace }}/artifact/*"
token: ${{ secrets.GITHUB_TOKEN }}
# tag text is like "v1.2.3" so we need to remove the "v" from the tag
tag: "${{ github.ref_name }}"
release_name: "${{ github.ref_name }}"
release_body: "RoboCup Soccer Simulator Server"
draft: false
prerelease: false

0 comments on commit e057fde

Please sign in to comment.