github.com/nektos/act@v0.2.63/.github/workflows/release.yml (about)

     1  name: release
     2  on:
     3    push:
     4      tags:
     5        - v*
     6  
     7  jobs:
     8    release:
     9      name: release
    10      runs-on: ubuntu-latest
    11      steps:
    12        - uses: actions/checkout@v4
    13          with:
    14            fetch-depth: 0
    15        - uses: actions/setup-go@v5
    16          with:
    17            go-version-file: go.mod
    18            check-latest: true
    19        - uses: actions/cache@v4
    20          if: ${{ !env.ACT }}
    21          with:
    22            path: ~/go/pkg/mod
    23            key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    24            restore-keys: |
    25              ${{ runner.os }}-go-
    26        - name: GoReleaser
    27          uses: goreleaser/goreleaser-action@v5
    28          with:
    29            version: latest
    30            args: release --clean
    31          env:
    32            GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
    33        - name: Winget
    34          uses: vedantmgoyal2009/winget-releaser@v2
    35          with:
    36            identifier: nektos.act
    37            installers-regex: '_Windows_\w+\.zip$'
    38            token: ${{ secrets.WINGET_TOKEN }}
    39        - name: Chocolatey
    40          uses: ./.github/actions/choco
    41          with:
    42            version: ${{ github.ref }}
    43            apiKey: ${{ secrets.CHOCO_APIKEY }}
    44            push: true
    45        - name: GitHub CLI extension
    46          uses: actions/github-script@v7
    47          with:
    48            github-token: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
    49            script: |
    50              const mainRef = (await github.rest.git.getRef({
    51                owner: 'nektos',
    52                repo: 'gh-act',
    53                ref: 'heads/main',
    54              })).data;
    55              console.log(mainRef);
    56              github.rest.git.createRef({
    57                owner: 'nektos',
    58                repo: 'gh-act',
    59                ref: context.ref,
    60                sha: mainRef.object.sha,
    61              });