From 816624c0452c07a123dbc54e16d202ccaa8fc472 Mon Sep 17 00:00:00 2001 From: Mark Bundschuh Date: Sun, 14 Jan 2024 01:02:02 -0500 Subject: [PATCH] tidy --- .github/workflows/build.yaml | 42 ++++++++++++++++++++++++++++++++++++ README.md | 6 ++++++ readme.md | 10 --------- 3 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/build.yaml create mode 100644 README.md delete mode 100644 readme.md diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..2760354 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,42 @@ +name: Build and Release +on: + push: + branches: + - main + paths: + - src/** + - Cargo.toml + - Cargo.lock + - .github/workflows/build.yaml + workflow_dispatch: + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install Rust + run: | + sudo apt-get install musl-tools + rustup target add x86_64-unknown-linux-musl + + - name: Build + run: | + cargo build --release --target=x86_64-unknown-linux-musl + cp target/x86_64-unknown-linux-musl/release/canvas-cli canvas-cli-x86_64-unknown-linux-musl + + - name: Get tag name + id: tag-name + run: | + echo "tagname=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Release + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release create ${{ steps.tag-name.outputs.tagname }} -t "Linter" -n "Binary release (${{ steps.tag-name.outputs.tagname }})" + gh release upload ${{ steps.tag-name.outputs.tagname }} canvas-cli-x86_64-unknown-linux-musl diff --git a/README.md b/README.md new file mode 100644 index 0000000..bfaecb5 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +![canvas-cli --help](./docs/help.gif) + +## Submit assignments + +![canvas-cli submit --help](./docs/submit-help.gif) +![canvas-cli submit upload-test.pdf](./docs/submit.gif) diff --git a/readme.md b/readme.md deleted file mode 100644 index 30fb64b..0000000 --- a/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -![canvas-cli --help](./docs/help.gif) - -## Submit assignments - -![canvas-cli submit --help](./docs/submit-help.gif) -![canvas-cli submit upload-test.pdf](./docs/submit.gif) - -## Maintaining - -Occasionally, `graphql-client instrospect-schema https://canvas.instructure.com/api/graphql --authorization ... > generated/schema.json` must be run with authorization to update the graphql schema.