-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic-usage.yml
More file actions
52 lines (46 loc) · 1.19 KB
/
basic-usage.yml
File metadata and controls
52 lines (46 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Basic Usage Example
#
# This workflow demonstrates basic usage of the check-tag-action:
# - On pull requests: check that version has been bumped
# - On main branch: create release tags
name: Basic CI/CD
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
# Validate version was bumped in PRs
check-version:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Check version
uses: lindenlab/check-tag-action@v1
with:
mode: check
# Run tests (example)
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests
run: |
echo "Running tests..."
# Add your test commands here
# make test
# Create release tag when merged to main
tag-release:
if: github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Create release tag
uses: lindenlab/check-tag-action@v1
with:
mode: tag
# Optional: use the created tag for other steps
- name: Print created tag
run: echo "Created tag ${{ steps.tag.outputs.tag }}"