Skip to content

Commit

Permalink
chore(deprecated): using Environment Files
Browse files Browse the repository at this point in the history
  • Loading branch information
yannouuuu committed Jul 31, 2024
1 parent 1f6e0bf commit 1f31075
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
30 changes: 14 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
pattern: Zed-*
merge-multiple: true
path: target/release

- name: Verify downloaded artifacts
run: |
echo "Contents of current directory:"
Expand All @@ -125,8 +125,7 @@ jobs:
- name: Get current date
id: get_date
run: |
echo "DATE=$(date +'%m-%d-%Y')" >> $GITHUB_ENV
run: echo "DATE=$(date +'%m-%d-%Y')" >> $GITHUB_OUTPUT

- name: Get latest release tag
id: get_latest_tag
Expand All @@ -138,8 +137,8 @@ jobs:
LATEST_TAG="v0.0.0"
IS_PRERELEASE=false
fi
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
echo "IS_PRERELEASE=$IS_PRERELEASE" >> $GITHUB_ENV
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_OUTPUT
echo "IS_PRERELEASE=$IS_PRERELEASE" >> $GITHUB_OUTPUT
echo "Latest tag: $LATEST_TAG, Is Pre-release: $IS_PRERELEASE"
- name: Fetch release body from GitHub API
Expand All @@ -151,33 +150,32 @@ jobs:
-H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/repos/zed-industries/zed/releases/latest)
BODY=$(echo "$RELEASE_DATA" | jq -r '.body')
echo "RELEASE_BODY<<EOF" >> $GITHUB_ENV
echo "$BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "RELEASE_BODY<<EOF" >> $GITHUB_OUTPUT
echo "$BODY" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.LATEST_TAG }}
release_name: ${{ env.LATEST_TAG }}
body: ${{ env.RELEASE_BODY }}
release_name: ${{ steps.get_latest_tag.outputs.LATEST_TAG }}
tag_name: ${{ steps.get_latest_tag.outputs.LATEST_TAG }}
body: ${{ steps.fetch_body.outputs.RELEASE_BODY }}
draft: false
prerelease: ${{ env.IS_PRERELEASE }}
prerelease: ${{ steps.get_latest_tag.outputs.IS_PRERELEASE }}

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/release/Zed-windows-amd64-${{ env.LATEST_TAG }}.exe
asset_name: Zed-windows-amd64-${{ env.LATEST_TAG }}.exe
asset_path: ./target/release/Zed-windows-amd64-${{ steps.get_latest_tag.outputs.LATEST_TAG }}.exe
asset_name: Zed-windows-amd64-${{ steps.get_latest_tag.outputs.LATEST_TAG }}.exe
asset_content_type: application/octet-stream


- uses: actions/checkout@v4
with:
repository: yannouuuu/zed-windows-build
Expand All @@ -187,4 +185,4 @@ jobs:
with:
branch: update
file_pattern: build.md *-update.json
commit_message: Bump version ${{ env.NEXT_VER_CODE }}
commit_message: Bump version ${{ env.NEXT_VER_CODE }}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
build:
permissions: write-all
needs: check
uses: ./.github/workflows/build.yml
uses: ./.github/workflows/build.yml

0 comments on commit 1f31075

Please sign in to comment.