Skip to content

Commit

Permalink
Use gh command for release (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 11, 2024
1 parent 4e55f44 commit 9771147
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Sutou Kouhei <kou@clear-code.com>
# Copyright 2022-2024 Sutou Kouhei <kou@clear-code.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -55,14 +55,18 @@ jobs:
with:
name: zip
path: datafusion-c-${{ env.VERSION }}.zip
- uses: softprops/action-gh-release@v1
- name: Release
if: |
startsWith(github.ref, 'refs/tags/')
with:
body_path: datafusion-c-${{ env.VERSION }}/doc/source/news/${{ env.VERSION }}.md
files: |
datafusion-c-${{ env.VERSION }}.tar.gz
datafusion-c-${{ env.VERSION }}.zip
run: |
gh release create ${GITHUB_REF_NAME} \
--discussion-category Announcements \
--notes-file datafusion-c-${VERSION}/doc/source/news/${VERSION}.md \
--title "DataFucion C ${VERSION}" \
datafusion-c-${VERSION}.tar.gz
datafusion-c-${VERSION}.zip
env:
GH_TOKEN: ${{ github.token }}

build:
name: Build
Expand Down Expand Up @@ -186,15 +190,14 @@ jobs:
shopt -s globstar
cp -a package/${{ matrix.task-namespace }}/repositories/**/*.* ${{ matrix.id }}/
tar czf ${{ matrix.id }}.tar.gz ${{ matrix.id }}
echo "VERSION=${GITHUB_REF#refs/tags/}" >> ${GITHUB_ENV}
- name: Upload to release
uses: softprops/action-gh-release@v1
if: |
startsWith(github.ref, 'refs/tags/')
with:
body_path: doc/source/news/${{ env.VERSION }}.md
files: |
run:
gh release upload ${GITHUB_REF_NAME} \
${{ matrix.id }}.tar.gz
env:
GH_TOKEN: ${{ github.token }}
- name: Test
run: |
docker run \
Expand Down

0 comments on commit 9771147

Please sign in to comment.