Skip to content

Commit

Permalink
Add snap release workflows for future use
Browse files Browse the repository at this point in the history
  • Loading branch information
sed-i committed Aug 22, 2024
1 parent 3604ecf commit e138e1f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
name: Rust
name: Quality checks

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:

env:
CARGO_TERM_COLOR: always

jobs:
build:
quality-checks:
name: Quality checks

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- name: Lint
run: cargo fmt --check
- name: Clippy
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Pull Requests

on:
pull_request:
branches:
- main

jobs:
pull-request:
name: PR
uses: sed-i/juju-graph/.github/workflows/_quality-checks.yml@main
secrets: inherit
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
push:
branches:
- main

jobs:
quality-checks:
name: Quality checks
uses: sed-i/juju-graph/.github/workflows/_quality-checks.yml@main
secrets: inherit
release:
name: Release
runs-on: ubuntu-latest
needs:
- quality-checks
steps:
- uses: actions/checkout@v4
- uses: snapcore/action-build@v1
id: build
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
with:
snap: ${{ steps.build.outputs.snap }}
release: edge

0 comments on commit e138e1f

Please sign in to comment.