-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
68 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Release to 5/edge | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lib-check: | ||
name: Check libraries | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check libs | ||
uses: canonical/charming-actions/[email protected] | ||
with: | ||
# FIXME: CHARMHUB_TOKEN will expire in 2024-01-20 | ||
# NOTE: CHARMHUB_TOKEN is only allowed in latest/edge, latest/candidate | ||
credentials: "${{ secrets.CHARMHUB_TOKEN }}" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
ci-tests: | ||
needs: | ||
- lib-check | ||
uses: ./.github/workflows/ci.yaml | ||
|
||
build: | ||
name: Build charm | ||
uses: canonical/data-platform-workflows/.github/workflows/build_charm_without_cache.yaml@v5 | ||
with: | ||
charmcraft-snap-channel: "latest/edge" | ||
|
||
release: | ||
name: Release charm | ||
needs: | ||
- ci-tests | ||
- build | ||
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v5 | ||
with: | ||
channel: 5/edge | ||
artifact-name: ${{ needs.build.outputs.artifact-name }} | ||
secrets: | ||
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }} | ||
permissions: | ||
contents: write # Needed to create GitHub release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,21 +28,22 @@ jobs: | |
- lib-check | ||
uses: ./.github/workflows/ci.yaml | ||
|
||
release-to-charmhub: | ||
name: Release to CharmHub | ||
needs: | ||
- lib-check | ||
- ci-tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Upload charm to charmhub | ||
uses: canonical/charming-actions/[email protected] | ||
with: | ||
credentials: "${{ secrets.CHARMHUB_TOKEN }}" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
channel: "5/edge" | ||
build: | ||
name: Build charm | ||
uses: canonical/data-platform-workflows/.github/workflows/build_charm_without_cache.yaml@v5 | ||
with: | ||
charmcraft-snap-channel: "latest/edge" | ||
|
||
release: | ||
name: Release charm | ||
needs: | ||
- ci-tests | ||
- build | ||
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v5 | ||
with: | ||
channel: 5/edge | ||
artifact-name: ${{ needs.build.outputs.artifact-name }} | ||
secrets: | ||
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }} | ||
permissions: | ||
contents: write # Needed to create GitHub release |