From 2428493ecc0bfb375873e9e702f7bc6101a3111d Mon Sep 17 00:00:00 2001 From: Indu Prakash <6459774+iprak@users.noreply.github.com> Date: Fri, 1 Nov 2024 20:48:16 -0500 Subject: [PATCH] Cleanup release action (#142) * deleted duplicate file * fix: passing tag_name to zip step --- .github/release.yml | 56 ----------------------------------- .github/workflows/release.yml | 1 + 2 files changed, 1 insertion(+), 56 deletions(-) delete mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml deleted file mode 100644 index 0f9e98f..0000000 --- a/.github/release.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Release -on: - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Gets semantic release info - id: semantic_release_info - uses: jossef/action-semantic-release-info@v2 - env: - GITHUB_TOKEN: ${{ github.token }} - - - name: Update Version and Commit - if: ${{steps.semantic_release_info.outputs.version != ''}} - run: | - echo "Version: ${{steps.semantic_release_info.outputs.version}}" - sed -i "s/\"version\": \".*\"/\"version\": \"${{steps.semantic_release_info.outputs.version}}\"/g" custom_components/yahoofinance/manifest.json - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add -A - git commit -m "chore: bumping version to ${{steps.semantic_release_info.outputs.version}}" - git tag ${{ steps.semantic_release_info.outputs.git_tag }} - - - name: Push changes - if: ${{steps.semantic_release_info.outputs.version != ''}} - uses: ad-m/github-push-action@v0.8.0 - with: - github_token: ${{ github.token }} - tags: true - - - name: Create GitHub Release - if: ${{steps.semantic_release_info.outputs.version != ''}} - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - tag_name: ${{ steps.semantic_release_info.outputs.git_tag }} - release_name: ${{ steps.semantic_release_info.outputs.git_tag }} - body: ${{ steps.semantic_release_info.outputs.notes }} - draft: false - prerelease: false - - - name: "ZIP the integration directory" - shell: "bash" - run: | - cd "${{ github.workspace }}/custom_components/yahoofinance" - zip yahoofinance.zip -r ./ - - - name: "Upload the ZIP file to the release" - uses: "softprops/action-gh-release@v2.0.8" - with: - files: ${{ github.workspace }}/custom_components/yahoofinance/yahoofinance.zip \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f9e98f..c7adf05 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,4 +53,5 @@ jobs: - name: "Upload the ZIP file to the release" uses: "softprops/action-gh-release@v2.0.8" with: + tag_name: ${{ steps.semantic_release_info.outputs.git_tag }} files: ${{ github.workspace }}/custom_components/yahoofinance/yahoofinance.zip \ No newline at end of file