Skip to content

Commit

Permalink
Initial test of release job. (#1)
Browse files Browse the repository at this point in the history
* Initial test of release job.

* Testing out action.

* Adding debug output

* Adding debug output 2

* Adding debug output 3

* Adding debug output 4

* Modifying version.
  • Loading branch information
EmbeddedDevops1 authored May 20, 2024
1 parent 4bd5647 commit 33cdda2
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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

1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.2

0 comments on commit 33cdda2

Please sign in to comment.