diff --git a/.github/workflows/push-stable.yml b/.github/workflows/push-stable.yml index 8f492e9..50708f6 100644 --- a/.github/workflows/push-stable.yml +++ b/.github/workflows/push-stable.yml @@ -3,9 +3,9 @@ name: Push Stable on: push: tags: - - v1.2.* - v1.3.* - v1.4.* + - v1.5.* workflow_dispatch: jobs: diff --git a/.github/workflows/trieve.yml b/.github/workflows/trieve.yml new file mode 100644 index 0000000..6c4bd9b --- /dev/null +++ b/.github/workflows/trieve.yml @@ -0,0 +1,35 @@ +name: Upload to Trieve + +on: + push: + tags: + - v1.3.* + - v1.4.* + - v1.5.* + workflow_dispatch: + +jobs: + uptrieve: + steps: + - if: ${{ github.event_name == 'workflow_dispatch' }} + uses: anycable/github-actions/.github/workflows/uptrieve.yml@master + secrets: + api_key: ${{ secrets.TRIEVE_API_KEY }} + dataset: ${{ secrets.TRIEVE_DATASET }} + - if: ${{ contains(github.ref, 'refs/tags/v') }} + id: version + run: | + echo ::set-output name=VERSION_TAG::$(echo ${GITHUB_REF#refs/tags/} | cut -d'.' -f1,2) + echo ::set-output name=VERSION_PREFIX::$(echo ${GITHUB_REF#refs/tags/} | awk -F. '{print $1 "-" $2}') + - if: ${{ contains(github.ref, 'refs/tags/v') }} + uses: anycable/github-actions/.github/workflows/uptrieve.yml@master + secrets: + api_key: ${{ secrets.TRIEVE_API_KEY }} + dataset: ${{ secrets.TRIEVE_DATASET }} + env: VERSION_TAG=${{ steps.version.outputs.VERSION_TAG }} VERSION_PREFIX=${{ steps.version.outputs.VERSION_PREFIX }} + - if: ${{ contains(github.ref, 'refs/tags/v') && steps.version.outputs.VERSION_TAG == 'v1.5' }} + uses: anycable/github-actions/.github/workflows/uptrieve.yml@master + secrets: + api_key: ${{ secrets.TRIEVE_API_KEY }} + dataset: ${{ secrets.TRIEVE_DATASET }} + env: VERSION_TAG=latest VERSION_PREFIX=