Skip to content

Commit

Permalink
testing release workflow tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
daneryl committed Aug 13, 2024
1 parent 9ece762 commit 434e95f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create_testing_release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy staging
name: Create Testing Release

on:
push:
Expand All @@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true

jobs:
create_pre_release:
create_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
21 changes: 12 additions & 9 deletions scripts/testing-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
# ssh_user=${2}
gh_token=${3}

release_version="$(yarn version | grep version: | cut -d" " -f4)"
release_version="$(yarn version | grep version: | cut -d" " -f4 | cut -d"-" -f1)-testing$(date +%s)"
# previous_tag="$(git tag -l --sort=committerdate | grep "\-rc" | tail -n1)"
# release_notes="$(git log --oneline "$previous_tag".. | grep -v Merge | grep "(.*)" | cut -d" " -f2- | awk '{print "* " $0}')"

# echo -e "## What's changed\n\n$release_notes\n\n**Full Changelog**: https://github.com/huridocs/uwazi/compare/$previous_tag...$release_version" > release_notes.txt

tar -czf uwazi_testing_release.tgz ./prod
echo $release_version

# --notes-file release_notes.txt\

GITHUB_TOKEN="$gh_token" gh release create "$release_version"\
--title "Testing $release_version"\
--prerelease\
--target testing\
uwazi_testing_release.tgz
# new_version=$release_version sed -i -r 's/(.*)("version")(:\s+)(.*)/echo "\1\\"\2\\"\3\\"$new_version\\""/ge' ./prod/package.json
# tar -czf uwazi_testing_release.tgz ./prod
#
# # --notes-file release_notes.txt\
#
# GITHUB_TOKEN="$gh_token" gh release create "$release_version"\
# --title "Testing $release_version"\
# --prerelease\
# --target testing\
# uwazi_testing_release.tgz

# scp uwazi_pre_release.tgz "$ssh_user"@"$server":/home/"$ssh_user"/uwazi-operations/release_builds/uwazi_pre_release.tgz

0 comments on commit 434e95f

Please sign in to comment.