diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5d8fbc5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI Pipeline + +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + changes: + runs-on: ubuntu-latest + outputs: + version_changed: ${{ steps.filter.outputs.version_changed }} + steps: + - uses: actions/checkout@v3 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + version_changed: + - 'version.txt' # Adjust the path as needed + + test: + runs-on: ubuntu-latest + steps: + - name: Echo Test + run: echo "This is supposed to be a test job" + + release: + needs: [test, changes] + if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changes.outputs.version_changed == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Debug Output + run: | + echo "Event: ${{ github.event_name }}, Branch: ${{ github.ref }}" + - name: Extract version + run: cat version.txt + \ No newline at end of file diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..7bcd0e3 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.0.2 \ No newline at end of file