Create jsdeliver index.min.mjs script #138
This file contains hidden or 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: Create jsdeliver index.min.mjs script | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "27 6 * * *" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '24' | |
| - name: Release missing versions | |
| shell: bash | |
| run: | | |
| echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import | |
| git config --global user.name '${{ vars.GIT_USER_NAME }}' | |
| git config --global user.email '${{ vars.GIT_USER_EMAIL }}' | |
| git config --global commit.gpgsign true | |
| git config --global gpg.program gpg | |
| git config --global user.signingkey '${{ vars.GPG_KEY_ID }}' | |
| npm view @aws-sdk/${{ github.event.repository.name }} versions --json > ./.github/tmp/versions.json | |
| npm install --prefix . semver@7.7.3 | |
| chmod +x ./.github/tmp/release.sh | |
| node ./.github/tmp/release.mjs | |
| env: | |
| REPO_NAME: ${{ github.event.repository.name }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| ORG_NAME: ${{ github.repository_owner }} | |
| first: | |
| if: false | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Wait Some Time | |
| shell: bash | |
| run: sleep 60 | |
| - name: Checkout code | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| token: ${{ secrets.GH_PAT }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '24' | |
| - name: Release missing versions | |
| shell: bash | |
| run: | | |
| echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import | |
| git config --global user.name '${{ vars.GIT_USER_NAME }}' | |
| git config --global user.email '${{ vars.GIT_USER_EMAIL }}' | |
| git config --global commit.gpgsign true | |
| git config --global gpg.program gpg | |
| git config --global user.signingkey '${{ vars.GPG_KEY_ID }}' | |
| git pull origin main | |
| sleep 10 | |
| node ./.github/tmp/first.mjs | |
| git rm ./.github/tmp/first.mjs ./.github/tmp/services.txt | |
| git add ./.github/workflows/build.yml | |
| git commit -S -m "ci: update release workflow" | |
| git push origin HEAD | |
| env: | |
| REPO_NAME: ${{ github.event.repository.name }} | |
| GH_TOKEN: ${{ secrets.GH_PAT }} | |
| ORG_NAME: ${{ github.repository_owner }} | |