Skip to content

Commit

Permalink
update release action
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Castro authored Jul 23, 2023
1 parent c178f31 commit ba4584a
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/xcode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,18 @@ jobs:
cd build
zip -r "ishare_macOS.zip" "ishare.app"
- name: Get previous release tag
id: previous_release
run: echo "::set-output name=tag::$(git describe --tags --abbrev=0)"

- name: Get commit messages since latest release
id: commit_messages
run: |
latest_tag="${{ steps.latest_tag.outputs.tag }}"
if [ -z "$latest_tag" ]; then
latest_tag=$(git rev-list --max-parents=0 HEAD)
fi
git log --pretty=format:"- %s" $latest_tag..HEAD > commits.txt
echo "::set-output name=commits::$(cat commits.txt)"
- name: Set shortened SHA
run: echo "SHORT=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ github.run_id }}
release_name: Release v${{ github.run_id }}
body: |
Changes in this release:
${{ steps.commit_messages.outputs.commits }}
tag_name: v${{ env.SHORT }}
release_name: Release ${{ env.SHORT }}
generate_release_notes: true
draft: false
prerelease: true

Expand Down

0 comments on commit ba4584a

Please sign in to comment.