diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68c62b2..e9fde67 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,7 @@ name: Build, Package & Release on: push: - tags: - - '*' + branches: [ main ] jobs: build: @@ -32,7 +31,6 @@ jobs: path: build/ package: - if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest needs: build steps: @@ -60,10 +58,23 @@ jobs: name: flixpatrol path: bin/ - release: - if: startsWith(github.ref, 'refs/tags/') + tag-new-versions: runs-on: ubuntu-latest needs: package + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 2 + - name: Create new tag + id: new-tag + uses: salsify/action-detect-and-tag-new-version@v2 + outputs: + tag: ${{ steps.new-tag.outputs.tag }} + + release: + runs-on: ubuntu-latest + needs: tag-new-versions steps: - name: Restore build artifact uses: actions/download-artifact@v3 @@ -79,6 +90,8 @@ jobs: uses: softprops/action-gh-release@v1 with: body: ${{steps.github_release.outputs.changelog}} + name: ${{needs.tag-new-versions.outputs.tag}} + tag_name: ${{needs.tag-new-versions.outputs.tag}} files: | bin/flixpatrol-top10-linux bin/flixpatrol-top10-macos diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml deleted file mode 100644 index f3e2f22..0000000 --- a/.github/workflows/tag.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Tag - -on: - push: - branches: [ main ] - -jobs: - - tag-new-versions: - runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - - uses: salsify/action-detect-and-tag-new-version@v1.0.3 diff --git a/package.json b/package.json index e7e301e..f480843 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flixpatrol-top10", - "version": "1.1.4", + "version": "1.1.6", "description": "Get top10 list from flixpatrol and upload them to trakt", "main": "app.js", "scripts": {