fix(build): update usage of publish snap action (#3272)

* fix(build): use env variable to login with snapcraft 7

* refactor(build): replace deprecated set-output command in GHA

* fix(build): use correct environment variable for output

* style(build): run prettier
pull/3284/head
Danshil Kokil Mungur 2 years ago committed by GitHub
parent 374c78c989
commit 51b05cd8fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -94,9 +94,9 @@ jobs:
run: | run: |
failures=(neutral, skipped, timed_out, action_required) failures=(neutral, skipped, timed_out, action_required)
if [[ ${array[@]} =~ $WORKFLOW_CONCLUSION ]]; then if [[ ${array[@]} =~ $WORKFLOW_CONCLUSION ]]; then
echo ::set-output name=status::failure echo "status=failure" >> $GITHUB_OUTPUT
else else
echo ::set-output name=status::$WORKFLOW_CONCLUSION echo "status=$WORKFLOW_CONCLUSION" >> $GITHUB_OUTPUT
fi fi
- name: Post Status to Discord - name: Post Status to Discord
uses: sarisia/actions-status-discord@v1 uses: sarisia/actions-status-discord@v1

@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Get the version - name: Get the version
id: get_version id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx - name: Set up Docker Buildx

@ -67,9 +67,9 @@ jobs:
run: | run: |
git fetch --prune --tags git fetch --prune --tags
if [[ $GITHUB_REF == refs/tags/* || $GITHUB_REF == refs/heads/master ]]; then if [[ $GITHUB_REF == refs/tags/* || $GITHUB_REF == refs/heads/master ]]; then
echo ::set-output name=RELEASE::stable echo "RELEASE=stable" >> $GITHUB_OUTPUT
else else
echo ::set-output name=RELEASE::edge echo "RELEASE=edge" >> $GITHUB_OUTPUT
fi fi
- name: Set Up QEMU - name: Set Up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
@ -91,8 +91,9 @@ jobs:
snap: ${{ steps.build.outputs.snap }} snap: ${{ steps.build.outputs.snap }}
- name: Publish Snap Package - name: Publish Snap Package
uses: snapcore/action-publish@v1 uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_LOGIN }}
with: with:
store_login: ${{ secrets.SNAP_LOGIN }}
snap: ${{ steps.build.outputs.snap }} snap: ${{ steps.build.outputs.snap }}
release: ${{ steps.prepare.outputs.RELEASE }} release: ${{ steps.prepare.outputs.RELEASE }}
@ -109,9 +110,9 @@ jobs:
run: | run: |
failures=(neutral, skipped, timed_out, action_required) failures=(neutral, skipped, timed_out, action_required)
if [[ ${array[@]} =~ $WORKFLOW_CONCLUSION ]]; then if [[ ${array[@]} =~ $WORKFLOW_CONCLUSION ]]; then
echo ::set-output name=status::failure echo "status=failure" >> $GITHUB_OUTPUT
else else
echo ::set-output name=status::$WORKFLOW_CONCLUSION echo "status=$WORKFLOW_CONCLUSION" >> $GITHUB_OUTPUT
fi fi
- name: Post Status to Discord - name: Post Status to Discord
uses: sarisia/actions-status-discord@v1 uses: sarisia/actions-status-discord@v1

@ -35,9 +35,9 @@ jobs:
run: | run: |
git fetch --prune --unshallow --tags git fetch --prune --unshallow --tags
if [[ $GITHUB_REF == refs/tags/* || $GITHUB_REF == refs/heads/master ]]; then if [[ $GITHUB_REF == refs/tags/* || $GITHUB_REF == refs/heads/master ]]; then
echo ::set-output name=RELEASE::stable echo "RELEASE=stable" >> $GITHUB_OUTPUT
else else
echo ::set-output name=RELEASE::edge echo "RELEASE=edge" >> $GITHUB_OUTPUT
fi fi
- name: Set Up QEMU - name: Set Up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v2
@ -57,8 +57,9 @@ jobs:
snap: ${{ steps.build.outputs.snap }} snap: ${{ steps.build.outputs.snap }}
- name: Publish Snap Package - name: Publish Snap Package
uses: snapcore/action-publish@v1 uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_LOGIN }}
with: with:
store_login: ${{ secrets.SNAP_LOGIN }}
snap: ${{ steps.build.outputs.snap }} snap: ${{ steps.build.outputs.snap }}
release: ${{ steps.prepare.outputs.RELEASE }} release: ${{ steps.prepare.outputs.RELEASE }}
@ -75,9 +76,9 @@ jobs:
run: | run: |
failures=(neutral, skipped, timed_out, action_required) failures=(neutral, skipped, timed_out, action_required)
if [[ ${array[@]} =~ $WORKFLOW_CONCLUSION ]]; then if [[ ${array[@]} =~ $WORKFLOW_CONCLUSION ]]; then
echo ::set-output name=status::failure echo "status=failure" >> $GITHUB_OUTPUT
else else
echo ::set-output name=status::$WORKFLOW_CONCLUSION echo "status=$WORKFLOW_CONCLUSION" >> $GITHUB_OUTPUT
fi fi
- name: Post Status to Discord - name: Post Status to Discord
uses: sarisia/actions-status-discord@v1 uses: sarisia/actions-status-discord@v1

Loading…
Cancel
Save