Prefer GitHub Cli

This commit is contained in:
wusatosi 2023-05-02 03:32:51 -04:00 committed by GitHub
parent ba825b6b47
commit fe23e62a07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,24 +101,21 @@ jobs:
- name: Fetch environment variables - name: Fetch environment variables
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: name: env
env
- name: Set environment variables - name: Set environment variables
run: | run: cat commit.env >> $GITHUB_ENV
cat commit.env >> $GITHUB_ENV - name: Setup gh
- name: Create release uses: wusatosi/setup-gh@v1
uses: softprops/action-gh-release@v1
id: create_release
with: with:
token: ${{ secrets.RELEASE_TOKEN }} token: ${{ secrets.RELEASE_TOKEN }}
tag_name: ${{ env.TAG_NAME }} - name: Create release
name: ${{ env.RELEASE_NAME }} run: gh release create ${{ env.TAG_NAME }} -t ${{ env.RELEASE_NAME }} -n ${{ env.body }} --draft --prerelease
id: create_release
env:
body: | body: |
${{ env.RELEASE_DESCRIPTION }} ${{ env.RELEASE_DESCRIPTION }}
Built from ${{ env.LLVM_REPO }}@${{ env.LLVM_COMMIT }}. Built from ${{ env.LLVM_REPO }}@${{ env.LLVM_COMMIT }}.
prerelease: true
draft: true
- name: Preserve release info - name: Preserve release info
run: | run: |
echo "TAG_NAME=${{ env.TAG_NAME }}" >> release.env echo "TAG_NAME=${{ env.TAG_NAME }}" >> release.env
@ -197,13 +194,13 @@ jobs:
ref: master ref: master
- name: Install tools - name: Install tools
run: ${{ matrix.config.preinstall }} run: ${{ matrix.config.preinstall }}
# Visual Studio tools require a bunch of environment variables to be set.
# Run vcvars64.bat and re-export the current environment to the workflow.
# (It'd be nice to only export the variables that *changed*, oh well).
- name: Setup gh - name: Setup gh
uses: wusatosi/setup-gh@v1 uses: wusatosi/setup-gh@v1
with: with:
token: ${{ secrets.RELEASE_TOKEN }} token: ${{ secrets.RELEASE_TOKEN }}
# Visual Studio tools require a bunch of environment variables to be set.
# Run vcvars64.bat and re-export the current environment to the workflow.
# (It'd be nice to only export the variables that *changed*, oh well).
- name: Visual Studio environment - name: Visual Studio environment
if: matrix.config.name == 'windows' if: matrix.config.name == 'windows'
shell: powershell shell: powershell
@ -331,13 +328,12 @@ jobs:
- name: Fetch release info - name: Fetch release info
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: name: release
release
- name: Update the env variables - name: Update the env variables
run: > run: cat release.env >> $GITHUB_ENV
cat release.env >> $GITHUB_ENV - name: Setup gh
uses: wusatosi/setup-gh@v1
with:
token: ${{ secrets.RELEASE_TOKEN }}
- name: Publish release - name: Publish release
run: gh release edit ${{ env.TAG_NAME }} --draft=false run: gh release edit ${{ env.TAG_NAME }} --draft=false
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GH_REPO: ${{ github.repository }}