-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rollback legacy file and move to new one
- Loading branch information
Showing
2 changed files
with
30 additions
and
32 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 |
---|---|---|
|
@@ -16,8 +16,8 @@ on: | |
required: true | ||
|
||
jobs: | ||
release-to-charmhub: | ||
name: Release to CharmHub | ||
build: | ||
name: Build the charms | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
|
@@ -37,16 +37,39 @@ jobs: | |
- name: Unpack Artifact | ||
run: sudo apt-get update && sudo apt-get install tar && tar xf artifact.tar.gz | ||
if: ${{ inputs.artifact != '' }} | ||
- name: Build charm(s) | ||
run: | | ||
charmcraft pack --project-dir ${{ inputs.charm_path }} | ||
CHARMS=$(ls ./*.charm | jq -R -s -c 'split("\n")[:-1]') echo "charms=$CHARMS" >> "$GITHUB_OUTPUT" | ||
- name: Store charms | ||
uses: actions/upload-artifacts@v3 | ||
with: | ||
name: charms | ||
path: *.charm | ||
|
||
release-to-charmhub: | ||
name: Release to CharmHub | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- build | ||
strategy: | ||
matrix: | ||
path: ${{ fromjson(needs.build.outputs.charms) }} | ||
steps: | ||
- name: Select charmhub channel | ||
uses: canonical/charming-actions/[email protected] | ||
id: channel | ||
- name: Fetch charm artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: charms | ||
- name: Upload charm to charmhub | ||
uses: canonical/charming-actions/[email protected] | ||
with: | ||
credentials: "${{ secrets.CHARMHUB_TOKEN }}" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
channel: "${{ steps.channel.outputs.name }}" | ||
charm-path: "${{ inputs.charm-path }}" | ||
built-charm-path: "${{ matrix.path }}" | ||
# We set destructive mode to false, otherwise runner's OS would have to match | ||
# charm's 'build-on' OS. | ||
destructive-mode: false |
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 |
---|---|---|
|
@@ -16,8 +16,8 @@ on: | |
required: true | ||
|
||
jobs: | ||
build: | ||
name: Build the artifacts | ||
release-to-charmhub: | ||
name: Release to CharmHub | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout | ||
|
@@ -36,35 +36,10 @@ jobs: | |
- name: Select charmhub channel | ||
uses: canonical/charming-actions/[email protected] | ||
id: channel | ||
- name: Build charm(s) | ||
run: | | ||
charmcraft pack --project-dir ${{ inputs.charm_path }} | ||
CHARMS=$(ls ./*.charm | jq -R -s -c 'split("\n")[:-1]') echo "charms=$CHARMS" >> "$GITHUB_OUTPUT" | ||
- name: Store artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: charms | ||
path: *.charm | ||
|
||
release-to-charmhub: | ||
name: Release to CharmHub | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
path: ${{ fromjson(needs.build.outputs.charms) }} | ||
needs: | ||
- build | ||
steps: | ||
- name: Download charm artifact | ||
with: | ||
name: charms | ||
- name: Upload charm to charmhub | ||
uses: canonical/charming-actions/[email protected] | ||
strategy: | ||
matrix: | ||
path: ${{ fromjson(outputs.charms) }} | ||
with: | ||
credentials: "${{ secrets.CHARMHUB_TOKEN }}" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
channel: "${{ needs.build.outputs.name }}" | ||
built-charm-path: "${{ matrix.path }}" | ||
channel: "${{ steps.channel.outputs.name }}" | ||
charm-path: "${{ inputs.charm-path }}" |