|
| 1 | +name: "Publish stage" |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + build_datetime: |
| 7 | + description: "Build datetime, set by the CI/CD pipeline workflow" |
| 8 | + required: true |
| 9 | + type: string |
| 10 | + build_timestamp: |
| 11 | + description: "Build timestamp, set by the CI/CD pipeline workflow" |
| 12 | + required: true |
| 13 | + type: string |
| 14 | + build_epoch: |
| 15 | + description: "Build epoch, set by the CI/CD pipeline workflow" |
| 16 | + required: true |
| 17 | + type: string |
| 18 | + nodejs_version: |
| 19 | + description: "Node.js version, set by the CI/CD pipeline workflow" |
| 20 | + required: true |
| 21 | + type: string |
| 22 | + python_version: |
| 23 | + description: "Python version, set by the CI/CD pipeline workflow" |
| 24 | + required: true |
| 25 | + type: string |
| 26 | + terraform_version: |
| 27 | + description: "Terraform version, set by the CI/CD pipeline workflow" |
| 28 | + required: true |
| 29 | + type: string |
| 30 | + version: |
| 31 | + description: "Version of the software, set by the CI/CD pipeline workflow" |
| 32 | + required: true |
| 33 | + type: string |
| 34 | + is_version_prerelease: |
| 35 | + description: "Is this a semantically versioned pre release, set by the CI/CD pipeline workflow" |
| 36 | + required: true |
| 37 | + type: string |
| 38 | +jobs: |
| 39 | + publish: |
| 40 | + name: "Publish packages" |
| 41 | + runs-on: ubuntu-latest |
| 42 | + timeout-minutes: 10 |
| 43 | + |
| 44 | + steps: |
| 45 | + - name: "Checkout code" |
| 46 | + uses: actions/checkout@v4 |
| 47 | + |
| 48 | + - name: "Get the artefacts 1" |
| 49 | + uses: actions/download-artifact@v4 |
| 50 | + with: |
| 51 | + path: ./artifacts/jekyll-docs-${{ inputs.version }} |
| 52 | + name: jekyll-docs-${{ inputs.version }} |
| 53 | + |
| 54 | + - name: "Create release" |
| 55 | + id: create_release |
| 56 | + uses: actions/create-release@v1 |
| 57 | + env: |
| 58 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 59 | + with: |
| 60 | + tag_name: ${{ inputs.version }} |
| 61 | + release_name: ${{ inputs.version }} |
| 62 | + body: | |
| 63 | + Release of ${{ inputs.version }} |
| 64 | + draft: false |
| 65 | + prerelease: ${{ inputs.is_version_prerelease == 'true'}} |
| 66 | + |
| 67 | + |
| 68 | + - name: "Upload jeykll docs release asset" |
| 69 | + uses: actions/upload-release-asset@v1 |
| 70 | + env: |
| 71 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 72 | + with: |
| 73 | + upload_url: "${{ steps.create_release.outputs.upload_url }}" |
| 74 | + asset_path: ./artifacts/jekyll-docs-${{ inputs.version }}/artifact.tar |
| 75 | + asset_name: jekyll-docs-${{ inputs.version }}.tar |
| 76 | + asset_content_type: "application/gzip" |
0 commit comments