deleted #59
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pull_request | |
on: pull_request_target | |
jobs: | |
# pull request-sepcific steps. | |
validate_commits: | |
name: Conventional Commits | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }} | |
ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }} | |
# validate commits. | |
- name: Validate commits | |
uses: KevinDeJong-TomTom/commisery-action@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
pull_request: ${{ github.event.number }} | |
# update the pull request message body. | |
update_body: | |
name: Changelog | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }} | |
ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }} | |
# create the changelog. | |
- name: Changelog | |
id: changelog | |
uses: metcalfc/[email protected] | |
with: | |
mytoken: ${{ secrets.GITHUB_TOKEN }} | |
head-ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }} | |
base-ref: ${{ (github.event.pull_request_target || github.event.pull_request).base.sha }} | |
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }} | |
continue-on-error: true | |
# update the pull request message body. | |
- name: Update Pull Request Description | |
uses: riskledger/update-pr-description@v2 | |
with: | |
body: ${{ steps.changelog.outputs.changelog || steps.changelog.outputs.result || 'An error occured. Please populate this yourself @${{ github.event.pull_request.sender.login }}' }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# lint code. | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }} | |
ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }} | |
# only lint on actual code changes. | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
base: ${{ (github.event.pull_request_target || github.event.pull_request).base.sha }} | |
filters: | | |
src: | |
- '**/*.swift' | |
- name: Lint | |
if: steps.changes.outputs.src == 'true' | |
uses: norio-nomura/[email protected] | |
with: | |
args: --strict | |
# build the library. | |
build: | |
name: Build | |
needs: lint | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
repository: ${{ (github.event.pull_request_target || github.event.pull_request).head.repo.full_name }} | |
ref: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }} | |
# only build on actual code changes. | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
base: ${{ (github.event.pull_request_target || github.event.pull_request).base.sha }} | |
filters: | | |
src: | |
- '**/*.swift' | |
- name: Build | |
if: steps.changes.outputs.src == 'true' | |
run: swift build |