Skip to content

Commit

Permalink
Go back to making pre-releases directly from develop branch
Browse files Browse the repository at this point in the history
  • Loading branch information
griff committed Oct 1, 2021
1 parent aaa29b8 commit d726310
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
- name: Setup | Checkout
uses: actions/checkout@v2
with:
token: ${{secrets.SITE_TOKEN}}
submodules: recursive
fetch-depth: '0'
- name: Setup | Ruby
Expand All @@ -26,17 +25,16 @@ jobs:
xcodebuild -target Package
- name: Tag release
if: "github.ref == 'refs/heads/develop'"
env:
SITE_TOKEN: ${{ secrets.SITE_TOKEN }}
run: |
. Scripts/tag-beta.bash
- name: Release | Setup
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/develop'
run: |
Scripts/release-notes.rb
Scripts/release-notes.rb > build/Release/Release-notes.md
VERSION=$(/usr/libexec/PlistBuddy -c "print :CFBundleShortVersionString" "build/Release/MetaZ.app/Contents/Info.plist")
echo "VERSION=$VERSION" >> $GITHUB_ENV
RELEASE_NAME="$(echo "$VERSION" | sed -e 's/.beta-/ Beta /')"
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV
mkdir Upload
Expand All @@ -46,14 +44,21 @@ jobs:
mv Upload/MetaZ-*+dSYM.zip Upload/Debug.dSYM.zip
mv Upload/MetaZ-*.json Upload/Sparkle.json
rm Upload/*.dmg
- name: Release | Create
if: startsWith(github.ref, 'refs/tags/')
- name: Pre-Release
if: github.ref == 'refs/heads/develop'
uses: softprops/action-gh-release@v1
with:
body_path: build/Release/Release-notes.md
# note you'll typically need to create a personal access token
# with permissions to create releases in the other repo
token: ${{ secrets.SITE_TOKEN }}
files: 'Upload/*'
prerelease: true
name: ${{ env.RELEASE_NAME }}
tag_name: v${{ env.VERSION }}
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
body_path: build/Release/Release-notes.md
token: ${{ secrets.SITE_TOKEN }}
files: 'Upload/*'
name: ${{ env.RELEASE_NAME }}
4 changes: 2 additions & 2 deletions Scripts/tag-beta.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [[ $GITHUB_REF != refs/tags/* ]]; then
export GIT_TAG=v${VERSION}
echo git tag $GIT_TAG -a -m "Generated tag from CI for build $GITHUB_RUN_NUMBER"
git tag $GIT_TAG -a -m "Generated tag from CI for build $GITHUB_RUN_NUMBER"
git push -q https://$SITE_TOKEN@github.com/griff/metaz --tags
git push -q https://$GITHUB_TOKEN@github.com/griff/metaz --tags
#export RELEASE_NAME="$(echo "$VERSION" | sed -e 's/.beta-/ Beta /')"
fi
else
Expand All @@ -24,7 +24,7 @@ fi
# Scripts/release-notes.rb
# Scripts/release-notes.rb > build/Release/Release-notes.md
# bundle exec Scripts/github_release.rb \
# --secret "$SITE_TOKEN" \
# --secret "$GITHUB_TOKEN" \
# --repo-slug griff/metaz \
# --changelog-file build/Release/Release-notes.md \
# --tag $GIT_TAG
Expand Down

0 comments on commit d726310

Please sign in to comment.