Github Actions
Written
- Each workflow is in a YAML file
- Here's an example that builds Rust binaries for each platform
-
```yaml
name: Build release binaries
# The events to trigger the workflow
# repositorydispatch is a manual trigger that you do via an API call
on:
repositorydispatch:
types: [tag-created]
jobs:
# Can define multiple jobs
release:
name: Build and Release
runs-on: $
matrix.os
strategy: matrix: include:
-
```yaml
name: Build release binaries
# The events to trigger the workflow
# repositorydispatch is a manual trigger that you do via an API call
on:
repositorydispatch:
types: [tag-created]
jobs:
# Can define multiple jobs
release:
name: Build and Release
runs-on: $
- os: ubuntu-latest artifactname: export-roam-notes assetname: export-roam-notes-linux-amd64
- os: macos-latest artifactname: export-roam-notes assetname: export-roam-notes-macos-amd64
- os: windows-latest artifactname: export-roam-notes.exe assetname: export-roam-notes-windows-amd64.exe steps:
- name: Checkout uses: actions/checkout@v2
- name: Build run: cargo build --release --locked
- name: Upload binary
uses: svenstaro/upload-release-action@v1-release
with:
repotoken: ${{ secrets.GITHUBTOKEN }}
file: target/release/$
matrix.artifact_name
assetname: ${{ matrix.assetname }} tag: $github.event.client_payload.new_version
``` - Manually Triggering Workflows
Thanks for reading! If you have any questions or comments, please send me a note on Twitter or Mastodon.