Skip to content

Commit

Permalink
Resolve build issues and log errors to stderr (#24)
Browse files Browse the repository at this point in the history
* Migrate to clap + update workflows

* Use stdout instead of println for faster printing

* Break into separate lib and bin crates

* Add PR template

* Commit Cargo.lock

* Fix Dockerfile not building

* Fix path to CHANGELOG in action

* Combine testing actions

* Remove failing test case

* Improved documentation + CHANGELOG

* Prepare for publishing CLI crate

* Add merge check list to PR template

* Test new docker image

* Revert testing image

* Test logging to stderr

* Revert test
  • Loading branch information
sean0x42 authored Oct 13, 2024
1 parent 2647122 commit 7b185cb
Show file tree
Hide file tree
Showing 26 changed files with 580 additions and 205 deletions.
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### What's changing?

<!-- Include a summary of all important changes -->

### See also

<!-- Link out to any related documentation or issues that this PR address -->

### Checklist

(For maintainers)

- [ ] Published to crates.io
- [ ] Published to Docker Hub
- [ ] Release created on GitHub
21 changes: 0 additions & 21 deletions .github/workflows/action_test.yml

This file was deleted.

30 changes: 21 additions & 9 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
name: Build & Test

name: Build and Test
on: [push]

jobs:
build:
build-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Verify package builds
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

- name: Build
run: cargo build --verbose
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify docker image builds
run: docker build .

- name: Run tests
run: cargo test --verbose
test-action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
file: crates/markdown-extract/CHANGELOG.md
pattern: "v2.0.0"
30 changes: 15 additions & 15 deletions .github/workflows/create_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4

- id: extract-changelog
uses: sean0x42/markdown-extract@v2
with:
file: CHANGELOG.md
pattern: ${{ github.ref_name }}
- id: extract-changelog
uses: sean0x42/markdown-extract@v2
with:
file: crates/markdown-extract/CHANGELOG.md
pattern: ${{ github.ref_name }}

- name: Create release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
tag_name: ${{ github.ref }}
body: ${{ steps.extract-changelog.outputs.markdown }}
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
- name: Create release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
tag_name: ${{ github.ref }}
body: ${{ steps.extract-changelog.outputs.markdown }}
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Temporary Items

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
Expand Down
Loading

0 comments on commit 7b185cb

Please sign in to comment.