Skip to content

Commit

Permalink
Rework Branching and CI/CD Pipeline (#24)
Browse files Browse the repository at this point in the history
The old branching system was way too complicated and not flexible (in terms of ci/cd). We now have a single main branch and all changes to the codebase will be done via pull requests and issues. A few changes were also done to the ci/cd pipeline:
- the changelog action was removed and replaced by the release-changelog
- when creating a pull request, the code will be checked for formatting, tests, and compiling
- as soon as a tag is pushed, a release will be automatically created
- when creating a release, the code will be published to crates.io
  • Loading branch information
Builditluc authored Mar 19, 2022
1 parent 094e28f commit bb291c6
Show file tree
Hide file tree
Showing 13 changed files with 181 additions and 382 deletions.
3 changes: 3 additions & 0 deletions .github/deadpendency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignore-failures:
rust:
- lazy_static
17 changes: 17 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
exclude:
authors:
- allcontributors
categories:
- title: Breaking Changes 🛠
labels:
- breaking-change
- title: Exciting New Features 🎉
labels:
- enhancement
- title: Bug Fixes 🐛
labels:
- bug
- title: Other Changes
labels:
- "*"
10 changes: 10 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
daysUntilStale: 60
daysUntilClose: 7
exemptLabels:
- pinned
- security
staleLabel: stale
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
32 changes: 0 additions & 32 deletions .github/workflows/build.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
push:
tags:
- 'v*.*.*'

name: Continuous Deployment

jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: softprops/action/gh/release@v2
with:
files: LICENSE.txt
token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: true

upload-assets:
name: Upload Assets
needs: release
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: wiki-tui
tar: all
zip: windows
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish:
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
18 changes: 0 additions & 18 deletions .github/workflows/changelog.yml

This file was deleted.

86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
on:
pull_request:

name: Continuous Integration

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --release

check:
name: Clippy Check
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

test:
name: Run Tests
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --release

format:
name: Check formatting
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
components: rustfmt
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
36 changes: 0 additions & 36 deletions .github/workflows/format.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/publish.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/test.yml

This file was deleted.

Loading

0 comments on commit bb291c6

Please sign in to comment.