1.0.0 #10
Workflow file for this run
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: Publish | |
| on: | |
| release: | |
| types: | |
| - published | |
| concurrency: publish | |
| jobs: | |
| docker: | |
| name: Publish Docker image | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download | |
| run: | | |
| gh release download ${{ github.event.release.tag_name }} -p 'santa-lang-prancer-cli-${{ github.event.release.tag_name }}-docker.tar' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Load | |
| run: | | |
| docker load -i santa-lang-prancer-cli-${{ github.event.release.tag_name }}-docker.tar | |
| docker tag ghcr.io/eddmann/santa-lang-prancer:cli-latest ghcr.io/eddmann/santa-lang-prancer:cli-${{ github.event.release.tag_name }} | |
| - name: Publish | |
| run: | | |
| echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
| docker push ghcr.io/eddmann/santa-lang-prancer:cli-latest | |
| docker push ghcr.io/eddmann/santa-lang-prancer:cli-${{ github.event.release.tag_name }} | |
| web: | |
| name: Publish Web | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download | |
| run: | | |
| gh release download ${{ github.event.release.tag_name }} -p 'santa-lang-prancer-web-${{ github.event.release.tag_name }}.tar.gz' | |
| mkdir -p out | |
| tar -xzvf santa-lang-prancer-web-${{ github.event.release.tag_name }}.tar.gz -C out | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages | |
| folder: out | |
| # TODO: Enable when AWS credentials are configured | |
| # lambda: | |
| # name: Publish Lambda layer | |
| # runs-on: ubuntu-24.04 | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # - name: Download | |
| # run: | | |
| # gh release download ${{ github.event.release.tag_name }} -p 'santa-lang-prancer-lambda-${{ github.event.release.tag_name }}.zip' | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # - name: Publish | |
| # run: | | |
| # LAYER_VERSION=$( | |
| # aws lambda publish-layer-version \ | |
| # --region eu-west-1 \ | |
| # --layer-name "santa-lang" \ | |
| # --zip-file "fileb://santa-lang-prancer-lambda-${{ github.event.release.tag_name }}.zip" \ | |
| # --compatible-runtimes provided.al2 \ | |
| # --license-info MIT \ | |
| # --output text \ | |
| # --query Version | |
| # ) | |
| # aws lambda add-layer-version-permission \ | |
| # --region eu-west-1 \ | |
| # --layer-name "santa-lang" \ | |
| # --version-number "${LAYER_VERSION}" \ | |
| # --action lambda:GetLayerVersion \ | |
| # --statement-id public \ | |
| # --principal "*" | |
| # env: | |
| # AWS_ACCESS_KEY_ID: ${{ secrets.LAMBDA_LAYER_AWS_ACCESS_KEY_ID }} | |
| # AWS_SECRET_ACCESS_KEY: ${{ secrets.LAMBDA_LAYER_AWS_SECRET_ACCESS_KEY }} |