Skip to content

Commit

Permalink
re-introduce publishing step after signing
Browse files Browse the repository at this point in the history
  • Loading branch information
Qix- committed Apr 9, 2024
1 parent 11ed28a commit 5d1ed2d
Showing 1 changed file with 62 additions and 61 deletions.
123 changes: 62 additions & 61 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
CURRENT_VERSION="$(curl --silent "https://app.gitbutler.com/releases/${{ env.channel }}" | jq -r '.version')"
NEXT_VERSION=$(./scripts/next.sh "${CURRENT_VERSION}" "${{ env.bump }}")
echo "version=$NEXT_VERSION" >> $GITHUB_ENV
echo "::set-output name=version::$NEXT_VERSION"
- name: import gpg key
if: runner.os == 'Linux'
Expand Down Expand Up @@ -165,64 +166,64 @@ jobs:
if-no-files-found: error
overwrite: true

# publish-tauri:
# strategy:
# fail-fast: false
# matrix:
# platform:
# - macos-latest # [macOs, x64]
# - macos-latest-xlarge # [macOs, ARM64]
# - ubuntu-20.04 # [linux, x64]
# - windows-latest # [windows, x64]
# needs: [sign-tauri, build-tauri]
# steps:
# - name: Download artifacts
# uses: actions/download-artifact@v4
# with:
# name: "${{ needs.build-tauri.outputs.channel }}-${{ matrix.platform }}"
# path: release
# - uses: shallwefootball/s3-upload-action@master
# name: Upload To S3
# id: S3
# with:
# aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
# aws_bucket: "releases.gitbutler.com"
# source_dir: "release/"
# destination_dir: "releases/${{ env.channel }}/${{ env.version }}-${{ github.run_number }}"
#
# # tell our server to update with the version number
# - name: Tell our server to update
# shell: bash
# run: |
# curl 'https://app.gitbutler.com/api/releases' \
# --fail \
# --request POST \
# --header 'Content-Type: application/json' \
# --header 'X-Auth-Token: ${{ secrets.BOT_AUTH_TOKEN }}' \
# --data '{"channel":"${{ env.channel }}","version":"${{ env.version }}-${{ github.run_number }}","sha":"${{ github.sha }}"}'
#
# - name: Tag release
# shell: bash
# env:
# TAG_NAME: "${{ env.channel }}/${{ env.version }}"
# run: |
# function tag_exists() {
# git tag --list | grep -q "^$1$"
# }
# function fetch_tag() {
# git fetch origin "refs/tags/$1:refs/tags/$1"
# }
# function delete_tag() {
# git push --delete origin "$1"
# }
# function create_tag() {
# git tag --force "$1"
# git push --tags
# }
#
# fetch_tag "$TAG_NAME" || true
# if tag_exists "$TAG_NAME"; then
# delete_tag "$TAG_NAME"
# fi
# create_tag "$TAG_NAME"
publish-tauri:
needs: [sign-tauri, build-tauri]
strategy:
fail-fast: false
matrix:
platform:
- macos-latest # [macOs, x64]
- macos-latest-xlarge # [macOs, ARM64]
- ubuntu-20.04 # [linux, x64]
- windows-latest # [windows, x64]
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: "${{ needs.build-tauri.outputs.channel }}-${{ matrix.platform }}"
path: release
- uses: shallwefootball/s3-upload-action@master
name: Upload To S3
id: S3
with:
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_bucket: "releases.gitbutler.com"
source_dir: "release/"
destination_dir: "releases/${{ needs.build-tauri.outputs.channel }}/${{ needs.build-tauri.outputs.version }}-${{ github.run_number }}"

# tell our server to update with the version number
- name: Tell our server to update
shell: bash
run: |
curl 'https://app.gitbutler.com/api/releases' \
--fail \
--request POST \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: ${{ secrets.BOT_AUTH_TOKEN }}' \
--data '{"channel":"${{ needs.build-tauri.outputs.channel }}","version":"${{ needs.build-tauri.outputs.version }}-${{ github.run_number }}","sha":"${{ github.sha }}"}'
- name: Tag release
shell: bash
env:
TAG_NAME: "${{ needs.build-tauri.outputs.channel }}/${{ needs.build-tauri.outputs.version }}"
run: |
function tag_exists() {
git tag --list | grep -q "^$1$"
}
function fetch_tag() {
git fetch origin "refs/tags/$1:refs/tags/$1"
}
function delete_tag() {
git push --delete origin "$1"
}
function create_tag() {
git tag --force "$1"
git push --tags
}
fetch_tag "$TAG_NAME" || true
if tag_exists "$TAG_NAME"; then
delete_tag "$TAG_NAME"
fi
create_tag "$TAG_NAME"

0 comments on commit 5d1ed2d

Please sign in to comment.