fix: Upgrade upload/download actions (#3015)
This commit is contained in:

committed by
GitHub

parent
69eee2a146
commit
54091f3c7d
20
.github/workflows/nightly-main.yml
vendored
20
.github/workflows/nightly-main.yml
vendored
@@ -52,10 +52,11 @@ jobs:
|
|||||||
bash -x ./scripts/patch_updater_yml.sh
|
bash -x ./scripts/patch_updater_yml.sh
|
||||||
bash -x ./scripts/cp_artifacts.sh release ./build/linux
|
bash -x ./scripts/cp_artifacts.sh release ./build/linux
|
||||||
- name: ci/upload-build
|
- name: ci/upload-build
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: build-nightly-main
|
name: build-nightly-main-${{ runner.os }}
|
||||||
path: ./build
|
path: ./build
|
||||||
|
compression-level: 0
|
||||||
retention-days: 5 ## No need to keep them since they are uploaded on S3
|
retention-days: 5 ## No need to keep them since they are uploaded on S3
|
||||||
|
|
||||||
build-msi-installer:
|
build-msi-installer:
|
||||||
@@ -102,10 +103,11 @@ jobs:
|
|||||||
bash -x ./scripts/patch_updater_yml.sh
|
bash -x ./scripts/patch_updater_yml.sh
|
||||||
bash -x ./scripts/cp_artifacts.sh release ./build/win-release
|
bash -x ./scripts/cp_artifacts.sh release ./build/win-release
|
||||||
- name: nightly/upload-build
|
- name: nightly/upload-build
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: build-nightly-main
|
name: build-nightly-main-${{ runner.os }}
|
||||||
path: ./build
|
path: ./build
|
||||||
|
compression-level: 0
|
||||||
retention-days: 5 ## No need to keep them since they are uploaded on S3
|
retention-days: 5 ## No need to keep them since they are uploaded on S3
|
||||||
|
|
||||||
mac-app-store-preflight:
|
mac-app-store-preflight:
|
||||||
@@ -182,10 +184,11 @@ jobs:
|
|||||||
- name: nightly/rename-arm64-to-m1
|
- name: nightly/rename-arm64-to-m1
|
||||||
run: rename 's/arm64/m1/' ./build/macos-release/$(jq -r .version package.json)/*
|
run: rename 's/arm64/m1/' ./build/macos-release/$(jq -r .version package.json)/*
|
||||||
- name: nightly/upload-build
|
- name: nightly/upload-build
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: build-nightly-main
|
name: build-nightly-main-${{ runner.os }}
|
||||||
path: ./build
|
path: ./build
|
||||||
|
compression-level: 0
|
||||||
retention-days: 5 ## No need to keep them since they are uploaded on S3
|
retention-days: 5 ## No need to keep them since they are uploaded on S3
|
||||||
|
|
||||||
upload-to-s3:
|
upload-to-s3:
|
||||||
@@ -208,10 +211,11 @@ jobs:
|
|||||||
aws-access-key-id: ${{ secrets.MM_DESKTOP_RELEASE_AWS_ACCESS_KEY_ID }}
|
aws-access-key-id: ${{ secrets.MM_DESKTOP_RELEASE_AWS_ACCESS_KEY_ID }}
|
||||||
aws-secret-access-key: ${{ secrets.MM_DESKTOP_RELEASE_AWS_SECRET_ACCESS_KEY }}
|
aws-secret-access-key: ${{ secrets.MM_DESKTOP_RELEASE_AWS_SECRET_ACCESS_KEY }}
|
||||||
- name: nightly/download-builds
|
- name: nightly/download-builds
|
||||||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
||||||
with:
|
with:
|
||||||
name: build-nightly-main
|
|
||||||
path: build
|
path: build
|
||||||
|
pattern: build-nightly-main-*
|
||||||
|
merge-multiple: true
|
||||||
- name: nightly/setup-files-for-aws
|
- name: nightly/setup-files-for-aws
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ./aws-s3-dist
|
mkdir -p ./aws-s3-dist
|
||||||
|
15
.github/workflows/nightly-rainforest.yml
vendored
15
.github/workflows/nightly-rainforest.yml
vendored
@@ -70,10 +70,11 @@ jobs:
|
|||||||
bash -x ./scripts/patch_updater_yml.sh
|
bash -x ./scripts/patch_updater_yml.sh
|
||||||
bash -x ./scripts/cp_artifacts.sh release ./build/win
|
bash -x ./scripts/cp_artifacts.sh release ./build/win
|
||||||
- name: nightly/upload-build
|
- name: nightly/upload-build
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: build-rainforest
|
name: build-rainforest-${{ runner.os }}
|
||||||
path: ./build
|
path: ./build
|
||||||
|
compression-level: 0
|
||||||
retention-days: 5 ## No need to keep them since they are uploaded on S3
|
retention-days: 5 ## No need to keep them since they are uploaded on S3
|
||||||
|
|
||||||
build-mac-installer:
|
build-mac-installer:
|
||||||
@@ -112,10 +113,11 @@ jobs:
|
|||||||
- name: nightly/rename-arm64-to-m1
|
- name: nightly/rename-arm64-to-m1
|
||||||
run: rename 's/arm64/m1/' ./build/macos/$(jq -r .version package.json)/*
|
run: rename 's/arm64/m1/' ./build/macos/$(jq -r .version package.json)/*
|
||||||
- name: nightly/upload-build
|
- name: nightly/upload-build
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: build-rainforest
|
name: build-rainforest-${{ runner.os }}
|
||||||
path: ./build
|
path: ./build
|
||||||
|
compression-level: 0
|
||||||
retention-days: 5 ## No need to keep them since they are uploaded on S3
|
retention-days: 5 ## No need to keep them since they are uploaded on S3
|
||||||
|
|
||||||
upload-to-s3-daily:
|
upload-to-s3-daily:
|
||||||
@@ -135,10 +137,11 @@ jobs:
|
|||||||
aws-access-key-id: ${{ secrets.MM_DESKTOP_DAILY_AWS_ACCESS_KEY_ID }}
|
aws-access-key-id: ${{ secrets.MM_DESKTOP_DAILY_AWS_ACCESS_KEY_ID }}
|
||||||
aws-secret-access-key: ${{ secrets.MM_DESKTOP_DAILY_AWS_SECRET_ACCESS_KEY }}
|
aws-secret-access-key: ${{ secrets.MM_DESKTOP_DAILY_AWS_SECRET_ACCESS_KEY }}
|
||||||
- name: nightly/download-builds
|
- name: nightly/download-builds
|
||||||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
||||||
with:
|
with:
|
||||||
name: build-rainforest
|
|
||||||
path: build
|
path: build
|
||||||
|
pattern: build-rainforest-*
|
||||||
|
merge-multiple: true
|
||||||
- name: nightly/install-missing-deps
|
- name: nightly/install-missing-deps
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
74
.github/workflows/release.yaml
vendored
74
.github/workflows/release.yaml
vendored
@@ -20,14 +20,19 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: release/checkout-repo
|
- name: release/checkout-repo
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
|
- name: release/fetch-version
|
||||||
|
id: calc
|
||||||
|
run: echo "VERSION=$(jq -r .version package.json)" >> ${GITHUB_OUTPUT}
|
||||||
|
|
||||||
- name: release/notify-channel
|
- name: release/notify-channel
|
||||||
run: |
|
uses: mattermost/action-mattermost-notify@60f5da6e1796b033cf5a038b57031fa011962e27
|
||||||
jq --null-input \
|
with:
|
||||||
--arg icon_url "https://mattermost.com/wp-content/uploads/2022/02/icon.png" \
|
MATTERMOST_WEBHOOK_URL: ${{ secrets.MM_DESKTOP_RELEASE_WEBHOOK_URL }}
|
||||||
--arg username "MattermostRelease" \
|
MATTERMOST_USERNAME: MattermostRelease
|
||||||
--arg text "[$(jq -r .version package.json)] Release process for the desktop app has started, it should take about 30 minutes to complete." \
|
MATTERMOST_ICON_URL: https://mattermost.com/wp-content/uploads/2022/02/icon.png
|
||||||
'{"username":$username,"icon_url": $icon_url, "text": $text }' > /tmp/webhook-data.json
|
TEXT: |
|
||||||
curl -i -H "Content-Type: application/json" -X POST -d @/tmp/webhook-data.json ${{ secrets.MM_DESKTOP_RELEASE_WEBHOOK_URL }} || echo "NOFICATION FAILED! check logs as this will succeed intentionally"
|
[${{ steps.calc.outputs.VERSION }}] Release process for the desktop app has started, it should take about 30 minutes to complete.
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
@@ -59,10 +64,11 @@ jobs:
|
|||||||
bash -x ./scripts/patch_updater_yml.sh
|
bash -x ./scripts/patch_updater_yml.sh
|
||||||
bash -x ./scripts/cp_artifacts.sh release ./build/linux
|
bash -x ./scripts/cp_artifacts.sh release ./build/linux
|
||||||
- name: release/upload-build
|
- name: release/upload-build
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: build
|
name: build-${{ runner.os }}
|
||||||
path: ./build
|
path: ./build
|
||||||
|
compression-level: 0
|
||||||
retention-days: 14 ## No need to keep CI builds more than 14 days
|
retention-days: 14 ## No need to keep CI builds more than 14 days
|
||||||
|
|
||||||
build-msi-installer:
|
build-msi-installer:
|
||||||
@@ -110,10 +116,11 @@ jobs:
|
|||||||
bash -x ./scripts/patch_updater_yml.sh
|
bash -x ./scripts/patch_updater_yml.sh
|
||||||
bash -x ./scripts/cp_artifacts.sh release ./build/win-release
|
bash -x ./scripts/cp_artifacts.sh release ./build/win-release
|
||||||
- name: release/upload-build
|
- name: release/upload-build
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: build
|
name: build-${{ runner.os }}
|
||||||
path: ./build
|
path: ./build
|
||||||
|
compression-level: 0
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
||||||
build-mac-installer:
|
build-mac-installer:
|
||||||
@@ -154,10 +161,11 @@ jobs:
|
|||||||
- name: release/rename-arm64-to-m1
|
- name: release/rename-arm64-to-m1
|
||||||
run: rename 's/arm64/m1/' ./build/macos-release/$(jq -r .version package.json)/*
|
run: rename 's/arm64/m1/' ./build/macos-release/$(jq -r .version package.json)/*
|
||||||
- name: release/upload-build
|
- name: release/upload-build
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
||||||
with:
|
with:
|
||||||
name: build
|
name: build-${{ runner.os }}
|
||||||
path: ./build
|
path: ./build
|
||||||
|
compression-level: 0
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
||||||
upload-to-s3:
|
upload-to-s3:
|
||||||
@@ -173,8 +181,14 @@ jobs:
|
|||||||
aws-region: us-east-1
|
aws-region: us-east-1
|
||||||
aws-access-key-id: ${{ secrets.MM_DESKTOP_RELEASE_AWS_ACCESS_KEY_ID }}
|
aws-access-key-id: ${{ secrets.MM_DESKTOP_RELEASE_AWS_ACCESS_KEY_ID }}
|
||||||
aws-secret-access-key: ${{ secrets.MM_DESKTOP_RELEASE_AWS_SECRET_ACCESS_KEY }}
|
aws-secret-access-key: ${{ secrets.MM_DESKTOP_RELEASE_AWS_SECRET_ACCESS_KEY }}
|
||||||
|
|
||||||
- name: release/download-builds
|
- name: release/download-builds
|
||||||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
||||||
|
with:
|
||||||
|
path: build
|
||||||
|
pattern: build-*
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
- name: release/setup-files-for-aws
|
- name: release/setup-files-for-aws
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ./aws-s3-dist
|
mkdir -p ./aws-s3-dist
|
||||||
@@ -189,12 +203,19 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: release/checkout-repo
|
- name: release/checkout-repo
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
|
|
||||||
- name: release/download-builds
|
- name: release/download-builds
|
||||||
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
|
||||||
|
with:
|
||||||
|
path: build
|
||||||
|
pattern: build-*
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
- name: release/setup-files-for-github-release
|
- name: release/setup-files-for-github-release
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ./ghr-dist
|
mkdir -p ./ghr-dist
|
||||||
find ./build/{macos-release,win-release,linux} -type f -exec cp --backup=numbered -t ./ghr-dist {} +
|
find ./build/{macos-release,win-release,linux} -type f -exec cp --backup=numbered -t ./ghr-dist {} +
|
||||||
|
|
||||||
- name: release/publish-release
|
- name: release/publish-release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.MATTERMOST_BUILD_GH_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.MATTERMOST_BUILD_GH_TOKEN }}
|
||||||
@@ -214,12 +235,19 @@ jobs:
|
|||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: release/notify-channel
|
|
||||||
|
- name: release/fetch-version
|
||||||
|
id: calc
|
||||||
run: |
|
run: |
|
||||||
git fetch --all
|
echo "BODY<<EOF" >> "${GITHUB_OUTPUT}"
|
||||||
jq --null-input \
|
bash -x scripts/generate_release_post.sh $(jq -r .version package.json) >> "${GITHUB_OUTPUT}"
|
||||||
--arg icon_url "https://mattermost.com/wp-content/uploads/2022/02/icon.png" \
|
echo "EOF" >> "${GITHUB_OUTPUT}"
|
||||||
--arg username "MattermostRelease" \
|
|
||||||
--arg text "$(bash -x scripts/generate_release_post.sh $(jq -r .version package.json))" \
|
- name: release/notify-channel
|
||||||
'{"username":$username,"icon_url": $icon_url, "text": $text }' > /tmp/webhook-data.json
|
uses: mattermost/action-mattermost-notify@60f5da6e1796b033cf5a038b57031fa011962e27
|
||||||
curl -i -H "Content-Type: application/json" -X POST -d @/tmp/webhook-data.json ${{ secrets.MM_DESKTOP_RELEASE_WEBHOOK_URL }} || echo "NOFICATION FAILED! check logs as this will succeed intentionally"
|
with:
|
||||||
|
MATTERMOST_WEBHOOK_URL: ${{ secrets.MM_DESKTOP_RELEASE_WEBHOOK_URL }}
|
||||||
|
MATTERMOST_USERNAME: MattermostRelease
|
||||||
|
MATTERMOST_ICON_URL: https://mattermost.com/wp-content/uploads/2022/02/icon.png
|
||||||
|
TEXT: |
|
||||||
|
${{ steps.calc.outputs.BODY }}
|
||||||
|
Reference in New Issue
Block a user