@@ -45,7 +45,7 @@ set in GitHub repository secrets.
45
45
- compiler: ghc-8.10.4
46
46
allow-failure: false
47
47
- compiler: ghc-8.8.4
48
- @@ -171,8 +181,56 @@
48
+ @@ -171,8 +181,66 @@
49
49
${CABAL} -vnormal check
50
50
- name: haddock
51
51
run: |
@@ -69,37 +69,47 @@ set in GitHub repository secrets.
69
69
+ if: matrix.upload && github.event_name == 'release'
70
70
+ run: |
71
71
+ set -ex
72
+ + PACKAGE_VERSION="${PACKAGE_VERSION#v}"
72
73
+ curl \
73
74
+ --silent --show-error --fail \
74
75
+ --header "Accept: text/plain" \
75
- + --header "Authorization: X-ApiKey ${{ secrets. HACKAGE_API_KEY }} " \
76
- + --form package=@$ GITHUB_WORKSPACE/sdist/${{ github.event.repository.name }} -${{ github.event.release.tag_name }} .tar.gz \
76
+ + --header "Authorization: X-ApiKey $HACKAGE_API_KEY" \
77
+ + --form package=@"${ GITHUB_WORKSPACE} /sdist/${PACKAGE_NAME} -${PACKAGE_VERSION} .tar.gz" \
77
78
+ https://hackage.haskell.org/packages/candidates/
78
79
+ curl \
79
80
+ --silent --show-error --fail \
80
81
+ -X PUT \
81
82
+ --header "Accept: text/plain" \
82
- + --header "Authorization: X-ApiKey ${{ secrets. HACKAGE_API_KEY }} " \
83
+ + --header "Authorization: X-ApiKey $HACKAGE_API_KEY" \
83
84
+ --header "Content-Type: application/x-tar" \
84
85
+ --header "Content-Encoding: gzip" \
85
- + --data-binary @$GITHUB_WORKSPACE/haddock/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}-docs.tar.gz \
86
- + https://hackage.haskell.org/package/${{ github.event.repository.name }}-${{ github.event.release.tag_name }}/candidate/docs
86
+ + --data-binary @"${GITHUB_WORKSPACE}/haddock/${PACKAGE_NAME}-${PACKAGE_VERSION}-docs.tar.gz" \
87
+ + https://hackage.haskell.org/package/${PACKAGE_NAME}-${PACKAGE_VERSION}/candidate/docs
88
+ + env:
89
+ + HACKAGE_API_KEY: ${{ secrets.HACKAGE_API_KEY }}
90
+ + PACKAGE_NAME: ${{ github.event.repository.name }}
91
+ + PACKAGE_VERSION: ${{ github.event.release.tag_name }}
87
92
+ - name: hackage upload (release)
88
93
+ if: matrix.upload && github.event_name == 'workflow_dispatch'
89
94
+ run: |
90
95
+ set -ex
96
+ + PACKAGE_VERSION="${PACKAGE_VERSION#v}"
91
97
+ curl \
92
98
+ --silent --show-error --fail \
93
99
+ --header "Accept: text/plain" \
94
- + --header "Authorization: X-ApiKey ${{ secrets. HACKAGE_API_KEY }} " \
95
- + --form package=@$ GITHUB_WORKSPACE/sdist/${{ github.event.repository.name }} -${{ github.event.inputs.version }} .tar.gz \
100
+ + --header "Authorization: X-ApiKey $HACKAGE_API_KEY" \
101
+ + --form package=@"${ GITHUB_WORKSPACE} /sdist/${PACKAGE_NAME} -${PACKAGE_VERSION} .tar.gz" \
96
102
+ https://hackage.haskell.org/packages/
97
103
+ curl \
98
104
+ --silent --show-error --fail \
99
105
+ -X PUT \
100
106
+ --header "Accept: text/plain" \
101
- + --header "Authorization: X-ApiKey ${{ secrets. HACKAGE_API_KEY }} " \
107
+ + --header "Authorization: X-ApiKey $HACKAGE_API_KEY" \
102
108
+ --header "Content-Type: application/x-tar" \
103
109
+ --header "Content-Encoding: gzip" \
104
- + --data-binary @$GITHUB_WORKSPACE/haddock/${{ github.event.repository.name }}-${{ github.event.inputs.version }}-docs.tar.gz \
105
- + https://hackage.haskell.org/package/${{ github.event.repository.name }}-${{ github.event.inputs.version }}/docs
110
+ + --data-binary @"${GITHUB_WORKSPACE}/haddock/${PACKAGE_NAME}-${PACKAGE_VERSION}-docs.tar.gz" \
111
+ + https://hackage.haskell.org/package/${PACKAGE_NAME}-${PACKAGE_VERSION}/docs
112
+ + env:
113
+ + HACKAGE_API_KEY: ${{ secrets.HACKAGE_API_KEY }}
114
+ + PACKAGE_NAME: ${{ github.event.repository.name }}
115
+ + PACKAGE_VERSION: ${{ github.event.inputs.version }}
0 commit comments