Convert Preview to Stable #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Convert Preview to Stable | |
on: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
upload: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Metadata | |
uses: actions/checkout@v3 | |
with: | |
ref: metadata | |
- name: Copy Files | |
shell: pwsh | |
env: | |
V: v1 | |
run: | | |
Copy-Item $env:V/release_preview_arm64.json $env:V/release_stable_arm64.json -Force | |
Copy-Item $env:V/release_preview_x64.json $env:V/release_stable_x64.json -Force | |
Copy-Item $env:V/version_preview_arm64.json $env:V/version_stable_arm64.json -Force | |
Copy-Item $env:V/version_preview_x64.json $env:V/version_stable_x64.json -Force | |
- name: Push Metadata | |
run: | | |
git config --global user.name '${{ github.actor }}' | |
git config --global user.email '${{ github.actor }}@users.noreply.github.com' | |
git commit -am "convert preview to stable" | |
git push | |
- name: Upload to OSS | |
run: | | |
rm -rf ./.git ./.github | |
curl https://gosspublic.alicdn.com/ossutil/install.sh | sudo bash | |
ossutil config -e ${{ secrets.OSS_ENDPOINT }} -i ${{ secrets.ACCESS_KEY_ID }} -k ${{ secrets.ACCESS_KEY_SECRET }} | |
ossutil cp -rf ./ oss://starward/metadata/ |