Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Shfty committed Apr 23, 2023
1 parent baf795f commit 0994e71
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/create-tag-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release on Tag

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: read

name: Generate Release
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get previous tag
id: previousTag
run: |
name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -2 | head -1)
echo "previousTag: $name"
echo "previousTag=$name" >> $GITHUB_ENV
- name: Generate changelog
id: changelog
uses: metcalfc/[email protected]
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
head-ref: ${{ env.previousTag }}
base-ref: ${{ github.ref_name }}

- name: Create Release
uses: ncipollo/[email protected]
with:
draft: true
token: ${{ github.token }}
name: "Release ${{ github.ref_name }}"
body: "## Release Notes\n\nTODO\n\n## Commits\n\n${{ steps.changelog.outputs.changelog }}"
11 changes: 11 additions & 0 deletions .github/workflows/publish-rust-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Publish Rust Docs
run-name: ${{ github.actor }} is publishing documentation 🚀
on:
push:

permissions:
contents: write

jobs:
publish-cargo-doc:
uses: Shfty/github-actions/.github/workflows/publish-rust-docs.yml@master
22 changes: 22 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Rust

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

0 comments on commit 0994e71

Please sign in to comment.