Skip to content

Commit

Permalink
Revert "Create PRs in new-release.yml (frzyc#1631)"
Browse files Browse the repository at this point in the history
This reverts commit 57d3a8f.
  • Loading branch information
RobberToe committed Mar 13, 2024
1 parent 4bd200c commit 53b744b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 74 deletions.
67 changes: 0 additions & 67 deletions .github/workflows/build-new-release.yml

This file was deleted.

44 changes: 37 additions & 7 deletions .github/workflows/new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Get version # TODO(eeeqeee) add option to increment from current version
id: get-version
run: |
echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
Expand All @@ -34,14 +40,38 @@ jobs:
id: get-commit-msg
run: |
if [[ -z "${{ steps.get-version.outputs.version }}" ]]; then
echo "title-release=Release ref $(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "msg=deploy: $(git rev-parse HEAD)" >> $GITHUB_OUTPUT
else
echo "title-release=Release version ${{ steps.get-version.outputs.version }} $(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "msg=deploy: version ${{ steps.get-version.outputs.version }} $(git rev-parse HEAD)" >> $GITHUB_OUTPUT
fi
- name: Create PR
- name: Yarn install
run: |
yarn install --immutable --immutable-cache
- name: Setup .env
run: |
printf '%s' "$ENVFILE" > apps/frontend/.env.local
env:
ENVFILE: ${{ vars.ENVFILE }}
- name: Build genshin-optimizer
run: |
NX_URL_GITHUB_GO_CURRENT_VERSION="https://github.com/${{ github.repository }}/commit/$(git rev-parse HEAD)" \
yarn run nx run frontend:build-vite:production
- name: Deploy to Github Pages
run: |
git fetch origin gh-pages --depth=1
git worktree add ../gh-pages gh-pages --no-checkout
cp -rT dist/apps/frontend ../gh-pages
cd ../gh-pages
git add --all .
git commit -m "${{ steps.get-commit-msg.outputs.msg }}"
git push
- name: Push
run: |
git status
git push origin HEAD:actions/new-release --force
gh pr create --base $(git rev-parse --abbrev-ref HEAD) --head actions/new-release --title '${{ steps.get-commit-msg.outputs.title-release }}' --body '' --label release
git push
- name: Make release
if: steps.get-version.outputs.version != ''
run: |
gh release create ${{ steps.get-version.outputs.version }} --generate-notes --target $(git rev-parse HEAD)
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 53b744b

Please sign in to comment.