Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
andystanton committed Jun 3, 2024
1 parent 0e4e4cb commit 4f1d5a1
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/run-tests-and-create-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run Tests and Create Tag

on:
push:
branches: [ main ]
paths-ignore: [ '.gitignore', '.swift-format', 'README.md', 'LICENSE' ]

jobs:
run_tests_and_create_tag:
runs-on: macos-14
env:
GITHUB_TOKEN: ${{ secrets.CUSTOM_ACCESS_TOKEN }}
permissions:
contents: write
steps:
- name: Set XCode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "15"
- name: Checkout project including tags
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run tests
run: swift test
- name: Get next version
id: get-next-version
uses: paulhatch/semantic-version@v5.0.0-alpha2
with:
tag_prefix: "v"
search_commit_body: false
- uses: ncipollo/release-action@v1
with:
commit: main
tag: ${{ steps.get-next-version.outputs.version_tag }}
21 changes: 21 additions & 0 deletions .github/workflows/run-tests-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Run Tests PR

on:
pull_request:
branches: [ main ]
paths-ignore: [ '.gitignore', '.swift-format', 'README.md', 'LICENSE' ]

jobs:
run_tests_pr:
runs-on: macos-14
steps:
- name: Set XCode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "15"
- name: Checkout project including tags
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run tests
run: swift test

0 comments on commit 4f1d5a1

Please sign in to comment.