File: release_create.yml

package info (click to toggle)
ada-url 3.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,296 kB
  • sloc: cpp: 24,166; ansic: 4,353; python: 573; sh: 189; makefile: 17
file content (61 lines) | stat: -rw-r--r-- 1,735 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Release Create

on:
  pull_request:
    types: [closed]

env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
  check-release-conditions:
    runs-on: ubuntu-latest
    if: |
      github.event.pull_request.merged == true &&
      github.event.pull_request.base.ref == 'main' &&
      startsWith(github.event.pull_request.head.ref, 'release/v') &&
      startsWith(github.event.pull_request.user.login, 'github-actions')

    steps:
      - name: Check release conditions
        run: |
          echo "All conditions have been met!"

  release-script-test:
    needs: check-release-conditions
    uses: ./.github/workflows/release-script-tests.yml

  create-release:
    permissions:
      contents: write
    needs: release-script-test
    runs-on: ubuntu-latest
    if: ${{ needs.release-script-test.result == 'success' }}

    env:
      NEXT_RELEASE_TAG: ${{ github.event.pull_request.head.ref }}
    steps:
      - name: Checkout
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

      - name: Prepare Python
        uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
        with:
          cache: 'pip' # caching pip dependencies

      - name: Install dependencies
        run: pip install -r ./tools/release/requirements.txt

      - name: Extract Tag from branch name
        run: |
          NEXT_RELEASE_TAG=$(echo $NEXT_RELEASE_TAG | sed 's/^release\///')
          echo "NEXT_RELEASE_TAG=${NEXT_RELEASE_TAG}" >> $GITHUB_ENV

      - name: Target release Tag
        run: echo "New tag $NEXT_RELEASE_TAG"

      - name: Amalgamation
        run: ./singleheader/amalgamate.py

      - name: "Create release"
        run: ./tools/release/create_release.py