-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63ab90a
commit 4398db1
Showing
6 changed files
with
113 additions
and
18 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
validate is automatically run on pushes to any branch, or pull requests to main | ||
|
||
to automatically create a new release and automatically upload mac, ubuntu, and windows builds run: | ||
`git tag v*` | ||
`git push origin v*` | ||
where * is the version number. | ||
|
||
Example: | ||
`git tag v1.2.1` | ||
`git push origin v1.2.1` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
create_release: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: teloscope ${{ github.ref }} | ||
body: | | ||
Changes in this Release | ||
draft: false | ||
prerelease: false | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
|
||
add_resources: | ||
needs: create_release | ||
name: Add Resources | ||
strategy: | ||
matrix: | ||
OS: [macos-latest, ubuntu-latest, windows-2019] | ||
include: | ||
- OS: macos-latest | ||
OS_NAME: macOS | ||
- OS: ubuntu-latest | ||
OS_NAME: linux | ||
- OS: windows-2019 | ||
OS_NAME: win | ||
runs-on: ${{ matrix.OS }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Build | ||
run: make | ||
- name: Zip | ||
uses: papeloto/action-zip@v1 | ||
with: | ||
files: build/bin/teloscope | ||
dest: result.zip | ||
- name: Add binaries | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: result.zip | ||
asset_name: teloscope.${{ github.ref_name }}-${{matrix.OS_NAME}}.zip | ||
asset_content_type: application/zip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"build/bin/teloscope-validate.exe" validateFiles |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build/bin/teloscope-validate validateFiles |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Validate | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
validate: | ||
name: Validate | ||
strategy: | ||
matrix: | ||
include: | ||
- os: macos-latest | ||
command: ".github/workflows/val.sh" | ||
- os: ubuntu-latest | ||
command: ".github/workflows/val.sh" | ||
chmod: true | ||
- os: windows-2019 | ||
command: ".github/workflows/val.bat" | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
- name: Build | ||
run: make all -j | ||
- name: Validate | ||
run: | | ||
chmod +x .github/workflows/val.sh | ||
${{ matrix.command }} |
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