Skip to content

Commit

Permalink
.github/workflows/release.yml update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
fb929 committed Nov 6, 2024
1 parent 44d5e6f commit 3ce61c7
Showing 1 changed file with 10 additions and 31 deletions.
41 changes: 10 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,14 @@
name: release

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: release

jobs:
create_release:
name: create release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
build:
name: build release
runs-on: ubuntu-22.04
needs: create_release
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -36,7 +19,7 @@ jobs:
run: |
echo "$GITHUB_REF_NAME" | sed 's|^[a-zA-Z]\+|RELEASE_VERSION=|' >> $GITHUB_OUTPUT
# create asset {{
# create asset
- name: create tar archive
run: |
cd .. &&
Expand All @@ -50,21 +33,17 @@ jobs:
--exclude='.git' \
--file=${{ github.event.repository.name }}-${{ steps.release-version.outputs.RELEASE_VERSION }}.tar.gz \
${{ github.event.repository.name }}-${{ steps.release-version.outputs.RELEASE_VERSION }}
# }}
- name: debug
run: |
ls -al ./
ls -al ../
# upload-release-asset {{
- name: upload-release-asset tar.gz
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: create release
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./../${{ github.event.repository.name }}-${{ steps.release-version.outputs.RELEASE_VERSION }}.tar.gz
asset_name: ${{ github.event.repository.name }}-${{ steps.release-version.outputs.RELEASE_VERSION }}.tar.gz
asset_content_type: application/gzip
# }}
generate_release_notes: true
prerelease: false
draft: false
files: |
./../${{ github.event.repository.name }}-${{ steps.release-version.outputs.RELEASE_VERSION }}.tar.gz

0 comments on commit 3ce61c7

Please sign in to comment.