diff --git a/.github/workflows/release-mas-only.yaml b/.github/workflows/release-mas-only.yaml deleted file mode 100644 index 41370bde..00000000 --- a/.github/workflows/release-mas-only.yaml +++ /dev/null @@ -1,81 +0,0 @@ -name: release - -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+-mas.[0-9]+" - -defaults: - run: - shell: bash - -env: - TERM: xterm - MM_WIN_INSTALLERS: 1 - -jobs: - begin-notification: - runs-on: ubuntu-22.04 - steps: - - name: release/checkout-repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: release/notify-channel - run: | - jq --null-input \ - --arg icon_url "https://mattermost.com/wp-content/uploads/2022/02/icon.png" \ - --arg 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." \ - '{"username":$username,"icon_url": $icon_url, "text": $text }' > /tmp/webhook-data.json - 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" - - mac-app-store-preflight: - runs-on: macos-12 - needs: - - begin-notification - env: - MAS_PROFILE: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MAS_PROFILE }} - MACOS_API_KEY_ID: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MACOS_API_KEY_ID }} - MACOS_API_KEY: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MACOS_API_KEY }} - MACOS_API_ISSUER_ID: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MACOS_API_ISSUER_ID }} - CSC_FOR_PULL_REQUEST: true - CSC_KEY_PASSWORD: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_CSC_KEY_PASSWORD}} - CSC_LINK: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_CSC_LINK }} - steps: - - name: release/checkout-repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: release/setup-node - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 - with: - node-version-file: "package.json" - cache: "npm" - cache-dependency-path: package-lock.json - - name: release/install-dependencies - run: | - brew install yq - npm ci - - name: release/copy-provisioning-profile - run: echo $MAS_PROFILE | base64 -D > ./mas.provisionprofile - - name: release/patch-version-number-for-MAS - run: ./scripts/patch_mas_version.sh - - name: release/test - uses: ./.github/actions/test - - name: release/package - run: npm run package:mas - - name: release/publish - run: fastlane publish_test path:"$(find . -name \*.pkg -print -quit)" - - end-notification: - runs-on: ubuntu-22.04 - needs: - - mac-app-store-preflight - steps: - - name: release/checkout-repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: release/notify-channel - run: | - jq --null-input \ - --arg icon_url "https://mattermost.com/wp-content/uploads/2022/02/icon.png" \ - --arg username "MattermostRelease" \ - --arg text "[$(jq -r .version package.json)] Release process for the desktop app ended, the new release can be found on [GitHub](https://github.com/mattermost/desktop/releases)." \ - '{"username":$username,"icon_url": $icon_url, "text": $text }' > /tmp/webhook-data.json - 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" diff --git a/.github/workflows/release-mas.yaml b/.github/workflows/release-mas.yaml new file mode 100644 index 00000000..e7ecde8d --- /dev/null +++ b/.github/workflows/release-mas.yaml @@ -0,0 +1,49 @@ +name: release-mas + +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-mas.[0-9]+" + +defaults: + run: + shell: bash + +env: + TERM: xterm + +jobs: + mac-app-store-preflight: + runs-on: macos-12 + env: + MAS_PROFILE: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MAS_PROFILE }} + MACOS_API_KEY_ID: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MACOS_API_KEY_ID }} + MACOS_API_KEY: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MACOS_API_KEY }} + MACOS_API_ISSUER_ID: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MACOS_API_ISSUER_ID }} + CSC_FOR_PULL_REQUEST: true + CSC_KEY_PASSWORD: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_CSC_KEY_PASSWORD}} + CSC_LINK: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_CSC_LINK }} + steps: + - name: release/checkout-repo + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 + - name: release/setup-node + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + with: + node-version-file: "package.json" + cache: "npm" + cache-dependency-path: package-lock.json + - name: release/install-dependencies + run: | + brew install yq + npm ci + - name: release/copy-provisioning-profile + run: echo $MAS_PROFILE | base64 -D > ./mas.provisionprofile + - name: release/patch-version-number-for-MAS + run: ./scripts/patch_mas_version.sh + - name: release/test + uses: ./.github/actions/test + - name: release/package + run: npm run package:mas + - name: release/publish + run: fastlane publish_test path:"$(find . -name \*.pkg -print -quit)" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 35813117..c02ea353 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -156,46 +156,9 @@ jobs: path: ./build retention-days: 14 - mac-app-store-preflight: - runs-on: macos-12 - needs: - - begin-notification - env: - MAS_PROFILE: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MAS_PROFILE }} - MACOS_API_KEY_ID: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MACOS_API_KEY_ID }} - MACOS_API_KEY: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MACOS_API_KEY }} - MACOS_API_ISSUER_ID: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_MACOS_API_ISSUER_ID }} - CSC_FOR_PULL_REQUEST: true - CSC_KEY_PASSWORD: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_CSC_KEY_PASSWORD}} - CSC_LINK: ${{ secrets.MM_DESKTOP_MAC_APP_STORE_CSC_LINK }} - steps: - - name: release/checkout-repo - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 - - name: release/setup-node - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 - with: - node-version-file: "package.json" - cache: "npm" - cache-dependency-path: package-lock.json - - name: release/install-dependencies - run: | - brew install yq - npm ci - - name: release/copy-provisioning-profile - run: echo $MAS_PROFILE | base64 -D > ./mas.provisionprofile - - name: release/patch-version-number-for-MAS - run: ./scripts/patch_mas_version.sh - - name: release/test - uses: ./.github/actions/test - - name: release/package - run: npm run package:mas - - name: release/publish - run: fastlane publish_test path:"$(find . -name \*.pkg -print -quit)" - upload-to-s3: runs-on: ubuntu-22.04 needs: - - mac-app-store-preflight - build-mac-installer - build-msi-installer - build-linux