diff --git a/.github/workflows/test-and-version.yml b/.github/workflows/test-and-version.yml index 7a0f5ed..032ee24 100644 --- a/.github/workflows/test-and-version.yml +++ b/.github/workflows/test-and-version.yml @@ -6,20 +6,26 @@ on: - master paths-ignore: - '.github/**' + pull_request: + branches: + - master jobs: tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Run tests run: | ./run_tests.sh - uses: ./versioner/ + if: github.ref == 'ref/heads/master' id: versioner - - run: | + - name: publish tag + if: github.ref == 'ref/heads/master' + run: | git config --global user.email ${{ secrets.EMAIL }} git config --global user.name ${{ secrets.NAME }} diff --git a/version.json b/version.json index f21f3a7..fbbb28b 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { "default_branch": "master", "major": "2", - "minor": "1" + "minor": "2" } diff --git a/versioner/action.yml b/versioner/action.yml index fd27123..d3b014c 100644 --- a/versioner/action.yml +++ b/versioner/action.yml @@ -8,10 +8,17 @@ outputs: runs: using: composite steps: + - name: Download versioner + shell: bash + working-directory: ${{ github.workspace }} + run: | + curl -o the_versioner -L https://github.com/DragosDumitrache/versioner/releases/download/2.2.0/version.sh + chmod +x the_versioner - name: Generate and tag a new version id: semver + working-directory: ${{ github.workspace }} shell: bash run: | - version_tag=$(${{ github.action_path }}./versioner/version.sh) + version_tag=$(./the_versioner) echo "Version is: $version_tag" echo "version=$(echo $version_tag)" >> $GITHUB_OUTPUT